Sign in to follow this  
Followers 0
FinalVersion

HotKey A Variable

15 posts in this topic

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.

Share this post


Link to post
Share on other sites



SetHotkey({enter},$cmd)

i hope it works for you. Forgive me if i show you wrong way :)


UnderWorldVN- Just play the way you like it

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

My Helpfile Doesn't Work. Don't suggest reinstalling Ai.

And no it isn't a button.

Are you kidding!?!

If you don't bother to look into helpfile then stop asking such simple/stupid questions here!

I hope nobody will help you anymore.

Edited by Zedna

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

;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

Share this post


Link to post
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
Sign in to follow this  
Followers 0