Help with some big issues please!

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Help with some big issues please!

Post by Marcdk » Sun Jul 06, 2008 2:32 pm

Hey, first of all i'd like to hear if anyone can revert a compiled exe? I lost my hole script due to a virus on my comp, i didn't have a backup (yes, very very stupid)

I have an old backup with much of bugs, but if you compare it to the other script it looks allmost the same, that should be proof enough that i made it. I Pm'ed the admistrator, but didn't recieve any answer yet :(


I have another problem too. I'm currently started a new macro where i have a lot of old scripts togehter in one macro using tabpages to manage trough them (very smart, thanks for this feature)

I have a problem with it. I have a command in one of my bots telling to open: Warcraft III, Its a window action so the game is supposed to stay open for this macro to work...

the problem is that i have a macro that is supposed to execute Warcraft III, so when i try to run it, it gives the following error:

---------------------------
Warning
---------------------------
Line: 608 Specified Window "open,Warcraft III" Not Present.
Any Subsequent Key Sends In Script May Cause Exceptions.
---------------------------
Abort Ignore
---------------------------


How can i come around this? I mean, when the script is loading it goes trough ALL the code (and there is more then 2000 lines) I want that when i press the start button it goes to an exact place in the script and starts from there, Is that possible? I mean, if i go to tabpage 5 and press: Start, the bot goes to line 900 and starts from there... Possible? I hope so :/


I hope someone can help me, i would REALLY apreciate that! Thanks

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Jul 07, 2008 11:29 am

Hi Marcdk,
You might want to submit a support ticket regarding your first problem http://www.mjtnet.com/contact.htm

As for your second problem,
My guess is "open," is the problem but I can't be sure without seeing the part of the code that is causing the error.
Last edited by Rain on Tue Jul 08, 2008 4:56 pm, edited 1 time in total.

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Mon Jul 07, 2008 4:13 pm

Yes, thats right! Its the "Open" command which is causing the error. But how can i prevent that? I mean if i have a:

Windowaction>Open, Warcraft III

and later:

Run Program>Warcraft III


I can't do the run when i have the open, so how can i make a possible solution for that? I would really apreciate a fast answer :)

Ps. Thanks for your reply. I thought no one would reply to my long post. :)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 07, 2008 4:30 pm

Please read the WindowAction topic in the help file. To save you pressing F1 I've copied it here. I've also added some emphasis.

WindowAction
Top Previous Next


WindowAction>Action,window_title



Use this function to restore, minimize, maximize or close a window.



Action can be any one of the following:



0: Restore the window

1: Maximize the window

2: Minimize the window

3: Close the window




If the WIN_USEHANDLE variable is set to 1 window_title must be a window handle.



Specify the window name in window_title. The window_title may contain the * symbol at the end to indicate a wildcard.



If the last character of the window title specified is an asterisk (*), Macro Scheduler will attempt to select the first window whose title matches the text entered exactly. If it cannot make an exact match it then looks at all windows and selects the first one it finds whose title contains the entered text. This solves the problem with applications such as Word or Netscape which change their titles depending on the document loaded. It is best to try to provide an exact (including case) window title to ensure the correct window is found, as many applications have multiple invisible windows with similar names. Specifying text without a trailing asterisk will force Macro Scheduler to only look for an exact match.



It is possible to limit the type of windows this command affects using the WF_TYPE variable:

Let>WF_TYPE=0 - No Child Windows

Let>WF_TYPE=1 - ALL Windows (Default)

Let>WF_TYPE=2 - Visible Windows Only

Let>WF_TYPE=3 - Child Windows Only



Abbreviation : WIN

See also : MoveWindow, ResizeWindow, CloseWindow



Example



WindowAction>2,notepad*
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Mon Jul 07, 2008 5:26 pm

I still don't get it. i have been reading it all, but it doesn't give any sense to me. If i do this:

windowaction>1,warcraft III*

Then it opens the game if the window is there... but the Run program>warcraft III does NOT work, and thats my hole problem ..

I have these codes:

Line 94: Windowaction>Open,Warcraft III
Line 684: Windowaction>Open,Warcraft III
Line 984: Run Program>Warcraft III


All these actions is triggered by a button.

Any help? I can't get it working, maybe my english isn't the best, sorry for that

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 07, 2008 6:05 pm

Look again at your code:
Windowaction>Open,Warcraft III
And compare it to this from the help file:
Action can be any one of the following:

0: Restore the window
1: Maximize the window
2: Minimize the window
3: Close the window
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Mon Jul 07, 2008 6:30 pm

Okay i tried to replace

Windowaction>Open,Warcraft III

with the following:

Windowaction>0,Warcraft III

i tried this one too:

Windowaction>1,Warcraft III

both of these commands doesn't work

When i press the button that is supposed to RUN the game, and not just open it, it doesn't do anything... i click, and nothing happens. I'm so lost, it might be simple, but i can't see ANY solution to fix this at all ...

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Tue Jul 08, 2008 11:15 am

Try
Windowaction>1,Warcraft III*
or
Windowaction>1,Warcraft III *

To run the game you have to include the correct path and file name.
For example
Run Program>c:\Program Files\Warcraft III\Warcraft III.exe

Read the Run Program topic in the help file for more information.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jul 08, 2008 11:52 am

Marcdk wrote:Okay i tried to replace

Windowaction>Open,Warcraft III
There's no such action as "Open" unless you have predefined it as one of the numerics in the help file.
with the following:

Windowaction>0,Warcraft III
That is to RESTORE an already open window.
i tried this one too:

Windowaction>1,Warcraft III
That is to MAXIMISE an already open window.
When i press the button that is supposed to RUN the game, and not just open it, it doesn't do anything... i click, and nothing happens. I'm so lost, it might be simple, but i can't see ANY solution to fix this at all ...
To run a game you need to use the Run Program command.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Tue Jul 08, 2008 3:04 pm

Well i figured it out now, by using:

Windowaction>1,Warcraft III *

I had that but it didn't work, so i took the IF statement and placed it at the top of my script instead of using it at line 600, then now, it works!! Thank you very much for helping me, soo much apreciated! :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts