taultunleashed logoGetCursorPos : XUnleashed Scripting Documentation
newtopic  postreply
 [ 16 posts ]  1, 2  Next
blue large dot

GetCursorPos : XUnleashed Scripting Documentation

Posted: January 10th, 2004, 3:39 pm
 
flash
flash's Reps:
User avatar
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)


Reply with quote
Posted: January 10th, 2004, 4:15 pm
 
cs001x
cs001x's Reps:
User avatar
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


Reply with quote
Posted: January 10th, 2004, 9:17 pm
 
flash
flash's Reps:
User avatar
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


Reply with quote
Posted: January 10th, 2004, 11:53 pm
 
cs001x
cs001x's Reps:
User avatar
Nope sorry, I dont know how to use 90% of those commands.


Reply with quote
Posted: January 12th, 2004, 12:59 pm
 
flash
flash's Reps:
User avatar
bump....
Can't anyone tell me what the problem is here?


Reply with quote
Posted: January 12th, 2004, 1:39 pm
 
WyvernX
WyvernX's Reps:
User avatar
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.


Reply with quote
Posted: January 12th, 2004, 2:51 pm
 
flash
flash's Reps:
User avatar
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?


Reply with quote
Posted: January 12th, 2004, 3:56 pm
 
Admin
Admin's Reps:
User avatar
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?


Reply with quote
Posted: January 12th, 2004, 5:05 pm
 
flash
flash's Reps:
User avatar
This is with DAOC, so no such menu.

But... the simple script that loops and read's the mouse works fine.


Reply with quote
Posted: January 12th, 2004, 8:18 pm
 
Admin
Admin's Reps:
User avatar
flash, can you record and playback macros that have mouse recordings?


Reply with quote
Posted: January 13th, 2004, 2:14 pm
 
flash
flash's Reps:
User avatar
yes.


Reply with quote
Posted: January 13th, 2004, 2:34 pm
 
WyvernX
WyvernX's Reps:
User avatar
You run a script, but the mouse down script commands do not work?

Try making the sleep commands between the mouse down events longer.


Reply with quote
Posted: January 13th, 2004, 2:44 pm
 
WyvernX
WyvernX's Reps:
User avatar
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

:)


Reply with quote
Posted: January 14th, 2004, 7:28 pm
 
flash
flash's Reps:
User avatar
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.


Reply with quote
Posted: January 16th, 2004, 6:41 am
 
flash
flash's Reps:
User avatar
Sorry. last posting should have said...

I've got. not "i've not got". lol. It's working fine


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 2 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of XUnleashed Scripting Documentation RSS Feed 

SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?