|
|
|
Page 1 of 2 |
[ 16 posts ] |
1, 2 Next
|
 GetCursorPos : XUnleashed Scripting Documentation
|
|
Posted: January 10th, 2004, 3:39 pm
|
|
|
|
flash
flash's Reps:
|
The following seems to fail silently (script appears to not run). Can you suggest what the problem might be?
Dim x, y
XUScriptHost.GetCursorPos(x, y)
XUScriptHost.LMouseDown(x, y)
XUScriptHost.Sleep 200
XUScriptHost.LMouseUp(x, y)
|
|
|
|
|
Posted: January 10th, 2004, 4:15 pm
|
|
|
|
cs001x
cs001x's Reps:
|
Dim x,y
do while true
XUScriptPlugin.Window.Title = "MousePos"
XUScriptHost.GetCursorPos x,y
XUScriptPlugin.staStatus.Text = "MousePos is " & x & ", " & y
XUScriptPlugin.Window.Invalidate
XUScriptHost.Sleep 100
loop
|
|
|
|
|
Posted: January 10th, 2004, 9:17 pm
|
|
|
|
flash
flash's Reps:
|
Yes, that program works fine.
For some reason, the GetCursorPos won't work in this one though.
Any ideas?
<b>Download Attachment:</b> [url="http://xunleashed.dyndns.org:81/forum/data/flash/2004110231726_sc1.vbs"][img]images/icon_paperclip.gif[/img] sc1.vbs[/url]<br />1.72 KB
|
|
|
|
|
Posted: January 10th, 2004, 11:53 pm
|
|
|
|
cs001x
cs001x's Reps:
|
Nope sorry, I dont know how to use 90% of those commands.
|
|
|
|
|
Posted: January 12th, 2004, 12:59 pm
|
|
|
|
flash
flash's Reps:
|
bump....
Can't anyone tell me what the problem is here?
|
|
|
|
|
Posted: January 12th, 2004, 1:39 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
Try using on the LogFile function to use CStr(LogFileName)
It might be crashing out on the log file stuff if it is expecting a string, and vbs only allows to create variant types.
|
|
|
|
|
Posted: January 12th, 2004, 2:51 pm
|
|
|
|
flash
flash's Reps:
|
Thanks for the suggestion, and i can try that... but I don't think that's the problem. This code works fine if i use keydown's instead of the mousedowns. the logfile code works fine unchanged.
Is there any way to get the visualbasic error message?
|
|
|
|
|
Posted: January 12th, 2004, 3:56 pm
|
|
|
|
Admin
Admin's Reps:
|
Not currently. We are adding some scripting enhancements now that we have GUI support for error messages, etc.
flash, can you record and playback macros that have mouse recordings?
Do you have hardware mouse turned on in the Start->Programs->FFXI->Config settings?
|
|
|
|
|
Posted: January 12th, 2004, 5:05 pm
|
|
|
|
flash
flash's Reps:
|
This is with DAOC, so no such menu.
But... the simple script that loops and read's the mouse works fine.
|
|
|
|
|
Posted: January 12th, 2004, 8:18 pm
|
|
|
|
Admin
Admin's Reps:
|
flash, can you record and playback macros that have mouse recordings?
|
|
|
|
|
Posted: January 13th, 2004, 2:14 pm
|
|
Posted: January 13th, 2004, 2:34 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
You run a script, but the mouse down script commands do not work?
Try making the sleep commands between the mouse down events longer.
|
|
|
|
|
Posted: January 13th, 2004, 2:44 pm
|
|
|
|
WyvernX
WyvernX's Reps:
|
Also, these tips might help.
1. You CANNOT use () when calling a SUB. To verify if you have accidently done this, try double clicking the script outside of XU. Ie, from windows. If you get ANY error other than complaining about the XUScriptHost, you will need to fix it.
2. Try using MouseMove TO the point you want to click at BEFORE you click there. Some apps have a detection alg to prevent it from doing mouse clicks if the mouse is not physically at that spot.
So, try
XUScriptHost.MouseMove x,y
XUScriptHost.Sleep 200
XUScriptHost.LMouseDown x,y
XUScriptHost.Sleep 200
XUScriptHost.LMouseUp x,y

|
|
|
|
|
Posted: January 14th, 2004, 7:28 pm
|
|
|
|
flash
flash's Reps:
|
I'm not at all sure what was broken, but I've not got the script working.
I'm *very* pleased with what this simple script does. I'll posting to the script
examples group soon.
Thank you for the help.
|
|
|
|
|
Posted: January 16th, 2004, 6:41 am
|
|
|
|
flash
flash's Reps:
|
Sorry. last posting should have said...
I've got. not "i've not got". lol. It's working fine
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 2 guests |
|
|
|