Is this possible with Macro Scheduler?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Nico
Newbie
Posts: 19
Joined: Tue Jul 08, 2008 3:15 pm

Is this possible with Macro Scheduler?

Post by Nico » Wed Sep 03, 2008 7:18 pm

Okay, so what i'm asking is, if it's possible to send mousemoves using variables.

So if i have a dialog with some editboxes, is it possible for the user to insert hes own mousemove values?

Here is some code, so you might understand my issue.

Mousemove>%MsEdit1%
wait>%MsEdit2%
Send>q
wait>2
press enter


So, What i'd like to do is let the user input the values.. Like 200,500

Possible? Because when i do this i get an error: Invalid nummeric value for mousemove command :(


Hope someone can give me some help, Thanks

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

Post by Marcus Tettmar » Wed Sep 03, 2008 8:00 pm

Yes, it is possible.

But MouseMove expects TWO variables. So either have your dialog box ask for the two values (you could use a custom dialog which asks for X and Y). Or if you just want to ask for one value (where the user enters the values separated by a comma) then you'll have to parse the values out:

Separate>msEdit1,COMMA,parts
MouseMove>parts_1,parts_2

Personally I'd advise the dialog asks for X and Y. That eliminates problems with the user entering the wrong format (e.g. using a colon instead of a comma).

MouseMove>msEdit1,msEdit2
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Nico
Newbie
Posts: 19
Joined: Tue Jul 08, 2008 3:15 pm

Post by Nico » Thu Sep 04, 2008 4:14 pm

Could you or another person do an example of the second example?

Because when i do ...

Mousemove>msEdit1,msEdit2

It says the same error.. Invalid mousemove command..

I got the two msEdit boxes with the x and y position seprated... So why doesn't it work? I don't understand it..

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

Post by Marcus Tettmar » Thu Sep 04, 2008 4:18 pm

Try this:

Code: Select all

Dialog>Dialog1
   Caption=Dialog1
   Width=349
   Height=189
   Top=367
   Left=629
   Edit=msEdit1,56,32,121,0
   Edit=msEdit2,192,32,121,0
   Label=X:,56,16,true
   Label=Y:,192,16,true
   Button=OK,56,80,75,25,1
EndDialog>Dialog1

Show>Dialog1,r

If>r=1
  MouseMove>Dialog1.msEdit1,Dialog1.msEdit2
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Nico
Newbie
Posts: 19
Joined: Tue Jul 08, 2008 3:15 pm

Post by Nico » Thu Sep 04, 2008 5:02 pm

Doh, i made a mistake.. forgot the "Dialog1."msEdit5

Thanks for the help :) Works perfect

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