Jump to content

HotKey A Variable


Recommended Posts

My current code:

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Cmd
            ;Code Here
    EndSwitch
WEnd

Basically I want it to run the $cmd when enter is pushed.

Link to comment
Share on other sites

What is $cmd? Is it a button? If so, give it the $BS_DEFPUSHBUTTON style and it will be triggered when you press [Enter] anyway.

WBD

Link to comment
Share on other sites

if _ispressed('0D') then _Function_ ()

Link to comment
Share on other sites

HEY HEY HEY!!! Calm down Zedna and Godly.. It's just a forum, no need to be hostile. Zedna, if he says the helpfile doesn't work then it probably doesn't work, and it doesn't actually show you how to hotkey a variable and that's why he has asked this in the forum. It's an interesting question and I myself would also like to know the answer for future reference.

Thank you.

Link to comment
Share on other sites

Well how about using the online version of the help file?

Well if he is to get some decent help, he should first check the helpfile, then he should search for his issue. After all of that, he should post here, including code that replicates the problem. At the moment no one knows the the hell $cmd is do we? We ain't no mind readers, and my crystal ball is cloudy, so I can't see what it is.

And FadeToGrey, Zedna is correct. You haven't been here long, so you probably have no idea how annoying simple questions can be answered, just by doing what I outlined before. It's more annoying when the question was answered 10 seconds ago too...

So how about you try that :)

Cheers,

Bret

Link to comment
Share on other sites

  • 2 weeks later...

;This should work.

HotKeySet( "{enter}", "_enter")

while 1

sleep(999999)

wend

Func _enter ()

send("{lwindown}{enter}{lwinup}")

shellexecute("cmd")

EndFunc;==>_Open

;if you dont want enter to work take out

;this line, send("{lwindown}{enter}{lwinup}")

Edited by program builder
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...