Jump to content

dsdsd


butji
 Share

Recommended Posts

EDIT: im sorry about name..... i cant undo it

how can i get this to work:

HotKeySet( "a", "a" )
HotKeySet( "b", "b" )

Func a()
    $lol = MouseGetPos()
EndFunc

Func b()
MsgBox( 1, "lol", "X = " & $lol[0] "  Y = " & $lol[1] )
EndFunc
While 1 = 1
WEnd

what i want it to do:

when a is pressed it remembers the mouse pos and when b is presses it shows the pos when a was pressed. but it doesnt show

Edited by butji
Link to comment
Share on other sites

Declare variable globally

HotKeySet( "a", "a" )
HotKeySet( "b", "b" )
Global $lol
Func a()
    $lol = MouseGetPos()
EndFunc

Func b()
MsgBox( 1, "lol", "X = " & $lol[0] & "  Y = " & $lol[1] )
EndFunc
While 1 = 1
WEnd
Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Global $lol; Recomended that you put your globals at the top for the script

HotKeySet( "a", "a" )
HotKeySet( "b", "b" )

Func a()
    $lol = MouseGetPos()
EndFunc

Func b()
MsgBox( 1, "lol", "X = " & $lol[0] & "  Y = " & $lol[1] )
EndFunc
While 1 = 1
WEnd

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...