Jump to content

Recommended Posts

Posted (edited)

Hello,

 

My ultimate goal is have my program running in the background, then when user press some hotkey it will activate my function. I'm having issues though where function actives without me hitting anything though. 

I tried to make a simple test file to figure out whats going on but I'm stuck.

 

HotKeySet("^{F12}",test());Trigger test() when ctrl+F12 is pressed

While True

Sleep(100); Continue running script
WEnd


Func test()

   MsgBox(0,"","hello")
EndFunc

 

When I run this I instantly get the message box saying hello, without hitting Ctrl+F12 which I want. What am I doing wrong here? 

Thanks for any help

Edited by AnonymousX
Posted
18 hours ago, AnonymousX said:

Thank you! Didn't realize that's how the function worked.

No problem.

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

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
  • Recently Browsing   0 members

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