Sign in to follow this  
Followers 0
flick

sending a function with ispressed

5 posts in this topic

#1 ·  Posted (edited)

how can i send a function with the command ispressed?

i.e:

While 1

If _IsPressed("41") Then

Send("_quit")

Sleep(1)

EndIf

Wend

Func _Quit()

Exit

i know how to do it with hotkey, but it's not working when i try it with ispressed

Edited by flick

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

While 1
If _IsPressed("41") Then _Quit()
Sleep(100)
WEnd

Func _Quit()
Exit
EndFunc

Edited by Swift

Share this post


Link to post
Share on other sites

While 1
If _IsPressed("41") Then _Quit()
Sleep(100)
WEnd

Func _Quit()
Exit
EndFunc
ok, so you don't need endif or send

it's telling me "unknown func name" when i type in the function name i gave the function in my script

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

flick - Post all of your code that is failing...

The mere snippet is inadequate for Swift fixing this new problem.

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

He got it fixed Squirrely, he PM'd me :)

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