Jump to content

Recommended Posts

Posted

@Valuater,

Interesting, I took that section of code to mean that the script and app is supposed to be up 100% of the time as it offers to restart the app if it is closed... but now that you mention it, I can see your take on it. I thought that you saw some functionality in the handling of windows that could not fit into the layout I posted - so I looked real hard for that and could not see such and I really wanted to know what I had missed. ...and thanks for the compliment, but I don't think that I've ever posted an original layout - I've just cobbled together other's code. I cannot remember who to credit/blame for the layout that I posted above.

@gamerman2360,

Where were you 15 posts ago? I like that layout better than the code I plagiarized. Perhaps I'll steal it for some future post. I'll give you credit (and/or blame) if I can remember from wince the code came.

Again, thanks to all enduring the many posts.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted (edited)

Thanks, but I can't say it was mine. I got it from the help file under HotKeySet. Where it says if you want to send a key you have to undeclare the hotkey first. Thanks tho. I think thats the first time I've ever been useful on these fourms :P. It was also used here by Larry(not exactly but still). Found it when browsing the final pages of the Scripts and Scraps subforum.

Edited by gamerman2360
Posted (edited)

Also a little note: When doing things like using 5 or 6 funcs that do the same thing except with different keys just use @HotKeyPressed. This would probably have been better:

HotKeySet("{F1}", "_Func");turns key on
HotKeySet("{F2}", "_Func");turns key on

; ----------- Key Functions ----------------------------
Func _F1_Func()
    If WinActive ("111.txt") And @HotKeyPressed = "{F1}" Then
        MsgBox(0, "1111", "Pressed F1")
    ElseIf WinActive ("222.txt") And @HotKeyPressed = "{F2}" Then
        MsgBox(0, "2222", "Pressed F2")
    Else
        HotKeySet(@HotKeyPressed)
        Send(@HotKeyPressed)
        HotKeySet(@HotKeyPressed, "_Func")
    EndIf
EndFunc  

Sleep(60000)

Edited by gamerman2360

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...