Sign in to follow this  
Followers 0
FreeFry

Is this a bug with HotKeySet?

3 posts in this topic

#1 ·  Posted (edited)

Hi, I made this script quite a long time ago, it gives some small functions that help me with my regular computer usage.

The function in it that I'm having problem with, is the one that involves the use of the key combination ralt+3 to send the currently playing song from winamp/filepath(depending on what type of window is open), and shift+ralt+3 to open up the song in internet explorer(selected).

It works, as long as sending everything, problem is that it for some reason leaves some modifier key held down, which makes every keypress after the one that triggers the hotkey, totally fucked up. ie. it behaves like if ctrl and alt is still pressed down(triggering key shortcuts in whatever window is open).

This did not happen "before" with my script, it started happening since i upgraded to a newer version of AutoIt(I'm not sure what version I was using before the upgrade, but it was not old at all).

I hope someone can shed some light on my problem, as I've tried everything to get it to work(sending cltr up/alt up, and both) but nothing seems to fix this problem...

Is this a bug in AutoIt, or a coding error by me?

Thanks on forehand.

Code:

#NoTrayIcon

#Include <Constants.au3>
#include <File.au3>
#incYH  Ð^K]LÉÝÂÜ
    ][ÝÕÚ[]SX]Ú[ÙI][ÝË
BÜ
    ][ÝÔÙ[¶WFVÆgV÷C²Â¤÷BgV÷Cµ6VæD¶WF÷väFVÆgV÷C²Â¤÷BgV÷CµG&WFõÕÍÅÕ½Ðì°À¤)=ÁÐ ÅÕ½ÐíQÉå5¹Õ5½ÅÕ½Ðì°Ä¤)=ÁÐ ÅÕ½ÐíIÕ¹ÉɽÉÍÑ°ÅÕ½;, 0)
Opt("TrayOnEventMode", 1)

FileInstall("gen_scripting. ][ÝËÙÜ[Q[Ñ [È ][ÝÉÌLÕÚ[[ ÌLÔYÚ[ÉÌLÙÙ[Ü7&FæræFÆÂgV÷C²Â ¥'VåvBgV÷C·&Vw7g#3"æWRgV÷C²fײ&öw&ÔfÆͥȵÀìÅÕ½ÐìÀäÈí]¥¹µÀÀäÈíA±Õ¥¹ÌÀäÈí¹}ÍÉ¥ÁÑ¥¹¹±°½ÌÅÕ½Ðì¤
If Not FileExists(@ProgramFilesDir & "\Winamp\Plugins&#LÙÙ[ÜØÜ[Ë  ][ÝÊH[Q[R[Ý[
    ][ÝÙÙ[ÜØÜ[Ë  ][ÝÂ&öw&ÔfÆW4F"fײgV÷C²b3#µvæ×b3#µÇVvç2b3#¶vVå÷67&Fær±°ÅÕ½Ðì¤(%5Í   ½à À°ÅÕ½Ðí10%¹Íѱ±ÅÕ½Ðì°ÅÕ½ÐíAÉÍÌ=,ѼÉÍÑÉÐinamp.")
    ProcessClose("winamp.exe")
    Sleep(2000)
    Run(@Prog[Q[Ñ  [È ][ÝÉÌLÕÚ[[ ÌLÕÚ[[^I][ÝÊBTÛY

B[` ¤FÒb33c´W'&÷$ö&¦V7BÒö&¤WfVçBgV÷C´WFôBäW'&÷"gV÷C²ÂgV÷CµôW'&÷"ÅÕ½Ðì¤ì¹É°
½´Éɽȡ¹±È()¥´ÀÌØí¹}MÉ¥ÁÑ¥¹ô=©
ÉÑ ÅÕt;gen_scripting.WinAmp")

Dim $IniFile = @AppDataDir & "ÌLÑYTÛÙ   ÌLÒ[  ÌLÔÙ][ÜË[I][ÝÂÜYÚ[ÛTÓÝÈ^Z[7GVf` ¤FÒb33c¶öÆE÷6öæp ¤FÒb33c¶ö& ¤FÒb33cµWFFTæÖT6öFRÒb33´÷Ð ÅÕ½ÐíQÉå%½¹!¥ÅÕ½Ðì°Ä¤ÌäìµÀì
I1µÀìÌäíM±À ÌÀÀÀ¤Ìäì& @CRLF & 'FileDelete("C:\Name.ini")' & Ô  [È ÌÎNÑ[Q[]JØÜ[]
IÌÎNÂÙ[YÚ[ÛTÓÝÈ^Z[r7GVf` ¢7&Vvöâvæ×çFgV6·W7GVf` ¤FÒb33cµvæF÷tæfõ³EÕ³EÒÒµ²gÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí±Í͹µõ]¥¹µÀØĹàÅÕ½Ðít°["", "", "", "classname=Winamp EQ"]É][ÝÉ][ÝË   ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝØÛÜÛ[YOUÚ[[I][ÝÒ²gV÷C²gV÷C²ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²ÂgV÷C¶6Æ76æÖSÕvæ×vVâgVÐíut()¥´ÀÌØíɽé¸ô±Í)¥´ÀÌØíA½Í¥Ñ¥½¹ô±Í((¹É¥½¸]¥¹mp Anti Fuckup Stuff

Dim $UseWinampInfo = True
Dim $UseMSNWhatsP^Z[ÈHYB[H ÌÍÕÙUÚ[[^HYB[H ÌÍÑÝ[HYBÓØE6WGFæw2 ¤bb33cµW6Uvæ×æfòFVà ÷D¶W6WBgV÷Cº2gV÷C²ÂgV÷Cµô6­Ñ¥ÙÅÕ½Ðì¤(%!½Ñ-åMÐ ÅÕ½Ðì®ÅÕ½Ðì°ÅÕ½Ðí}
¡­Ñ¥ÙÅÕ½Ðì¤)¹%
$SettingsItem = TrayCreateItem("Settings")
TrayCreateItem(&][ÝÉ][ÝÊBÌÍÐXÝ]][HH^PÜX]R][J   ][ÝÐXÝ]  ][ÝÊB^PÜX]RFVÒgV÷C²gV÷C²¢b33c´WDFVÒÒG&7&VFTFVÒgV÷C´WBgV÷C² ¥G&FµMÑ=¹Ù¹Ð ÀÌØíMÑÑ¥¹Í%Ñ´°ÅÕ½Ðí}!¹±QÉäÅÕ½Ðì¤)QÉå%ѵMÑ=¹Ù¹Ð$AboutItem, "_HandleTray")
TrayItemSetOnEvent($ExitItem    ][Ý×Ò[U^I][ÝÊB^TÙ]Ý]J
BÚ[HBBRY   ÌÍÕÙSTÓÚ]ÔÆærFVâö×6åõvG5Æær bb33cµW6Uvæ×fFVâô6V6µvæ× (%M±À ÄÀÀ¤($)]¹()Õ¹}!¹±QÉä ¤($(%1½°ÀÌØíQÉå5ÍôQIe}%($   Switch $TrayMsg
        
        Case $SettingsItem
            _EditSettings()
        CasH    ÌÍÐXÝ]][BBBWÔÚÝÐXÝ]

BBPØÙH    ÌÍÑ^]][BBBWÑ^]

BBBBQ[vF6 ¤VæDgVæ0 ¤gVæ2ôÆöE6WGFæw2  bæ÷BfÆTW7G2b33c´æfÆRF¸($%5Í   ½à À°ÅÕ½Ðí½ÕÐÅÕ½Ðì°ÅÕ½ÐíÑÕÉÌèÅÕ½ÐìµÀì
I1µÀìRLF _
            & "Winamp Position Locker: Makes the winamp window stay iHÝÜÚ][ÛY]  ÌÎNÜÈÝ[ÝYHHÙ][ÝÈ   [ÈÔ   [²5$Äbð fײgV÷Cµvæ×Æær6öæræfó¢F2Væ&ÆW2FRW6W"FÕÍÑ¡­ä½µ¥¹Ñ¥½¸±ÑȬÌѼ͹ѡѥѱ½Ñ¡ÕÉɹѱäÁ±å¥¹song." & @CRLF _
            & "This behaves differently dependingÛÚ]Ú[ÝÈ[ÝH]HÜ[][ÝÈ    [ÈÔ   [ÈÔÂBBI[È   ][C´fÆR÷Vâõ6VÆV7BvæF÷w3¢6VæG2FRfÆWFFòFR6öær÷R&RÆ7FVææѼ¸ÅÕ½ÐìµÀì
I1|($$$µÀìÅÕ½ÐíáÁ±½ÉÈÝ¥¹½Üè
½Á¥Ìѡͽ¹å½'re listening to, to the open folder." & @CRLF _
            & &quoÐ[HÝÚ[ÝÎÙ[ÈHÛÛÈ[ÊÝH]JK][ÝÈ  [ÈÔ   ײ5$Äbð fײgV÷Cµ&W76ær6gB´ÇDw"³2vÆÂ÷VâæB6VÆV7BFRÕÉɹѱäÁ±å¥¹Í½¹¥¸¥ÐÌäí̽¹Ñ¥¹½±È¸ÅÕ½ÐìµÀì
I1µÀ @CRLF _
            & "All these options can be toggled in the Settings meK][ÝÊBQ[YBIÌÍÕÙSTÓÚ]Ô^Z[ÈH[X[TXY
    ÌÍÒ[Q[ÂgV÷Cµ6WGFæw2gV÷C²ÂgV÷CµW6TÕ4åvG5ÆærgV÷C²Â b33cµW6Uvæ×¥àô9յȡ%¹¥I ÀÌØí%¹¥¥±°ÅÕ½ÐíMÑÑ¥¹ÌÅÕ½Ðì°ÅÕ½ÐíUÍ]¥¹µÁ¥", 1))
    $UseWinampInfo = Number(IniRead($IniFile, "Sett[ÜÉ][ÝË  ][ÝÕÙUÚ[[[É][ÝËJJBB[[Â[ÈÑY]Ù][ÜÊ
B ´wVâ6BW&P  ¤VæDgVæ0 ¤gVæ2õ6÷t&÷WB  ×6t&÷ÂgV÷C´&÷WBgÕ½Ðì°ÅÕ½ÐíÑÕÉÌèÅÕ½ÐìµÀì
I1µÀì
I1|($$µÀìÅÕ½Ðí]¥¹µÀosition Locker: Makes the winamp window stay in the last position if it&#39ÜÈÝ[ÝYHHÙ][ÝÈ  [ÈÔ   [ÈÔÂBI[È    ][ÝÕÚ[×Æær6öæræfó¢F2Væ&ÆW2FRW6W"FòW6RFR¶W6öÖ&æFöâÇDw¬ÌѼ͹ѡѥѱ½Ñ¡ÕÉɹѱäÁ±å¥¹Í½¹¸ÅÕ½ÐìµÀì
I1|($$mp; "This behaves differently depending on what window you have open:&][ÝÈ  [ÈÔ   [ÈÔÂBI[È    ][ÝÑ[HÜ[ÔÙ[XÝÚ[ÝÜÎÙ[2FRfÆWFFòFR6öær÷R&RÆ7FVæærFòâgV÷C²fײ5$Äbð f×ÅÕ½ÐíáÁ±½ÉÈÝ¥¹½Üè
½Á¥Ìѡͽ¹å½ÔÌäíɱ¥Íѹ¥¹Ñ¼°Ñ¼Ñ¡½Á folder." & @CRLF _
        & "Any other window: Sends the Song[ÊÝH]JK][ÝÈ  [ÈÔ   [ÈÔÂBI[È    ][ÝÔÜÚ[r6gB´ÇDw"³2vÆÂ÷VâæB6VÆV7BFR7W'&VçFÇÆær6öærâBb33·2½¹Ñ¥¹½±È¸ÅÕ½ÐìµÀì
I1µÀì
I1|($$µÀìÅÕ½ÐíQ¡¥ÌÁÉ½É was made by FreeFry, contact is possible via his email: neothematrixhackerÝXZ[ÛÛI][ÝÊBB[[Â[ÈÑ^]

BBQÜX]JÝ[ÓY
    ÌÍÒ[fÆRÂ7G&ætå7G"b33c´æfÆRÂgV÷C²b3#²gV÷C²ÂÂÓÓ  æw&F ÀÌØí%¹¥¥±°ÅÕ½ÐíMÑÑ¥¹ÌÅÕ½Ðì°ÅÕ½ÐíUÍ5M9]¡ÑÍA±å¥¹ÅÕ½Ðì°ÀÌØUseMSNWhatsPlaying)
    IniWrite($IniFile, "Settings", "UsUÚ[[^    ][ÝË  ÌÍÕÙUÚ[[^
BR[UÜ]J    ÌÍÒ[Q[K  ][ÝÔÙ][2gV÷C²ÂgV÷CµW6Uvæ×æfògV÷C²Âb33cµW6Uvæ×æfò  W@ ¤VæDgVæ0 Õ¹}µÍ¹}]¡ÑÍA±å¥¹ ¤($(%1½°ÀÌØíM½¹Q¥Ñ±($(%%9½Ð%Í=¨ ÀÌØí¹Scripting) Then
        $Gen_Scripting = ObjCreate("gen_scripting.WinAm ][ÝÊBQ[YBRYØÙÜÑ^ÝÊ  ][ÝÜØÚ]K^I][ÝÊH[BIÌÍÔÛÛFFÆRf׳ÒgV÷C´6öFærâgV÷C° VæD`  b&ö6W74W7G2gV÷C¶ÂæWRgÕ½Ðì¤=ÈAɽÍÍá¥ÍÑÌ ÅÕ½Ðí¡°È¹áÅÕ½Ðì¤Q¡¸($$ÀÌØíM½¹Q¥Ñ±µÀìôuot;Now Playing: [GAME] " & WinGetTitle("classname=Valve001&q[ÝÊH [È ][ÝÈ  ][ÝÂQ[ÙRYØÙÜÑ^ÝÊ   ][ÝÝØË^I][ÝÊH[ b33cµ6öæuFFÆRf׳ÒgV÷C´æ÷rÆæs¢´tÔUÒgV÷C²fײgV÷Cµv&7Ð%%$øÅÕ½Ðì(%±Í%AɽÍÍá¥ÍÑÌ ÅÕ½ÐíÅխ̹áÅÕ½Ðì¤Q¡¸($$ÀÌØSongTitle &= "Now Playing: [GAME] " & "Quake III AreH ][ÝÂQ[ÙRYØÙÜÑ^ÝÊ   ][ÝÜÝÜY^I][ÝÊH[BIÌÍÔÛæuFFÆRf׳ÒgV÷C´æ÷rÆæs¢´tÔUÒgV÷C²fײgV÷Cµ7F&7&gBâgVÐì(%¹%($(%%AɽÍÍá¥ÍÑÌ ÅÕ½ÐíÝ¥¹µÀ¹áÅÕ½Ð줹ÀÌØí¹}MÉ¥ÁÑ¥g <> 0 And IsObj($Gen_Scripting) Then
        $SongTitle &= &][ÝÈÓUTÒP×HH    ][ÝÈ  [È ÌÍÑÙ[ÔØÜ[ËÙ]^]J ÌÍÑÙ[67&FærävWEÆÆ7E÷6Föâ VæD`  bæ÷B7G&ætå7G"b33cµ6öæuFF°ÅÕ½ÐímÕÈÅÕ½Ð줹9½ÐMÑÉ¥¹%¹MÑÈ ÀÌØíM½¹Q¥Ñ±°ÅÕ½Ðím½¹¹Ñng") Then
        If $SongTitle <> $old_song And $SongT]H ÉÝÈ  ][ÝÉ][ÝÈ[BBR[]][ÝÐÎÌLÓ[YK[I][ÝË    V÷C´æÖRgV÷C²ÂgV÷C´æÖRgV÷C²Âb33cµ6öæuFFÆR b33c¶öÆE÷6öærÒb33íM½¹Q¥Ñ±($$%}5ձѥQÍ­}á ÀÌØíUÁÑ9µ
½¤($%±Í%ÀÌØíM½¹Q¥Ñ± <> $old_song And $SongTitle = "" Then
            IniWritJ    ][ÝÐÎÌLÓ[YK[I][ÝË    ][ÝÓ[YI][ÝË ][ÝÓ[YI][ÝË ][ÝËO4ÄT%ôÔSÒÒgV÷C² b33c¶öÆE÷6öærÒgV÷C²gV÷C° ô×VÇFF6µôWV2b33cUÁÑ9µ
½¤($%¹%(%¹%($)¹Õ¹()Õ¹}
¡­Ñ¥Ù ¤($(%1½°ÀÌ;wHandle
    Local $filePath
    Local $Activator = @HotKeyPressed
    
    IÝÓØ ÌÍÑÙ[ÔØÜ[ÊH[BIÌÍÑÙ[ÔØÜ[ÈHØÜX]J    ][C¶vVå÷67&Færåvä×gV÷C² VæD`  b4ö&¢b33c´vVåõ67&FærFVà %%AɽÍÍá¥ÍÑÌ ÅÕ½ÐíÝ¥¹µÀ¹áÅÕ½Ð줹%Í=¨ ÀÌØí¹}MÉ¥ÁÑ¥¹¤Q¡n
            
            If $Activator = "£" Then
                
                If WinActive(&quoØÛÜÛ[YOHÌÌÍÌ   ][ÝÊHÜÚ[]J   ][ÝØÛÜÛ[YOPÛÛÛÛUÚ[ÝÐÛÜÉ]÷C²FVà 6VæBb33c´vVåõ67&FærävWEÆÆ7DfÆRb33c´vVåõ67&FærÑA±å1¥ÍÑA½Í¥Ñ¥½¸ ¤¤°Ä¤($$$%±Í%]¥¹Ñ¥Ù ÅÕ½Ðí±Í͹µõ
¥¹Ñ]
±s", "FolderView") Then
                    FileCopy($Gen_Scripting.Get^[Ý[J   ÌÍÑÙ[ÔØÜ[ËÙ]^SÝÜÚ][Û
JKÛÛÛÙ]^
    ][C¶7FfRgV÷C²ÂgV÷C´föÆFW%fWrgV÷C²ÂgV÷C´VFCgV÷C²Â VÇ6P %M¹ ÀÌØí¹}MÉ¥ÁÑ¥¹¹ÑA±å1¥ÍÑQ¥Ñ± ÀÌØí¹}MÉ¥ÁÑ¥¹¹ÑA±å1¥ÍÑAsition()), 1)
                EndIf
                
            ElseIf $Activator = "+£" TheBBBBBBBT[Ú[ÝÜÑ [È ÌÎNÉÌLÙ^Ü^HÛÜÙ[XÝ ][ÝÉ3²fײb33c´vVåõ67&FærävWEÆÆ7DfÆRb33c´vVåõ67&FærävWEÆÆÑA½Í¥Ñ¥½¸ ¤¤µÀìÌäìÅÕ½ÐìÌäì¤($$$$($$%¹%($$$($%¹%(%¹%($)¹unc

Func _CheckWinamp()
    
    If WinExists($WindowInfo[0][3]) Then
        
        YÝÚ[XÝ]J ÌÍÕÚ[ÝÒ[ÖÌVÌ×JH[Ý    ÌÍÑÞ[[  ÌÍÔÜÚFöæVBFVà  bväW7G2b33cµvæF÷tæfõ³Õ³5ÒFVà  f÷"bÀÌØí¤ôÀQ¼Ì($$$$$($$$$$ÀÌØí]¥¹½Ý%¹½lÀÌØí¥ulÉtô]¥¹Ñ!¹± ÀÌØWindowInfo[$i][3])
                    
                    $WindowInfo[$i][0] = _WinGetPoÊ    ÌÍÕÚ[ÝÒ[ÖÉÌÍÚWVÌK
BBBBBIÌÍÕÚ[ÝÒ[ÖÉÌÍÚWVÌWHHÕÚ[WE÷2b33cµvæF÷tæfõ²b33c¶Õ³%Ò  6ÆVW  æW@ $$($$$$ÀÌØíɽé¸ôQÉÕ($$$$($$%¹%($$$($%±Í%]¥¹Ñ¥Ù ÀÌØí]¥¹½Info[0][3]) And $Frozen Then
            
            $Frozen = False
            
        ElseIf Ú[]J ÌÍÕÚ[ÝÒ[ÖÌVÌ×JH[Ý    ÌÍÑÞ[[BBBBBIÌÍÔÜFöæVBÒG'VP  VÇ6Tbæ÷Bvä7FfRb33cµvæF÷tæfõ³Õ³5ÒæBb33cɽé¸Q¡¸($$$($$%%]¥¹á¥ÍÑÌ ÀÌØí]¥¹½Ý%¹½lÁulÍt¤Q¡¸($$$$($$$%½È036;i = 0 To 3
                    
                    If Not BitAND(WinGetState($WindowInfo[0][3])H[^]ÛÜBBBBBBBBBRYÕÚ[Ù]ÜÊ ÌÍÕÚ[ÝÒ[ÖÉÌÍÚWVÌK
fÇC²fwC²b33cµvæF÷tæfõ²b33c¶Õ³Ò÷"õvävWE÷2b33cµvæF÷tæfõ²b33c¥ulÉt°Ä¤±ÐìÐìÀÌØí]¥¹½Ý%¹½lÀÌØí¥ulÅtQ¡¸($$$$$%]¥¹5½Ù ÀÌØí]¥dowInfo[$i][2], "", $WindowInfo[$i][0], $WindÝÒ[ÖÉÌÍÚWVÌWJBBBBBBU^U
    ][ÝÐ[HÚ[[XÚÝ   ][ÝË  ][ÝÔ]VçFVBÖ÷fVÖVçBöbvæF÷rb333²gV÷C²Â VæD`  6ÆVW ($$$%9áÐ($$$$($$%¹%($$$($%¹%($$(%±Í($$($$ÀÌØíɽé¸ô±Í($$36;Positioned = False
        
    EndIf
    
EndFunc

Func _MultiTask_Exec($s_Au3ÛÙJBBSØØ[    ÌÍÚWÔYSØØ[    ÌÍÜ×Õ[[HHÕ[[J[    ]÷C¶S5÷67&BgV÷C²ÂgV÷C²æS2gV÷C²  fÆUw&FRb33c·5õFV×fÆRÂb33cÍ}ÔÍ
½¤($($ÀÌØí¥}A¥ôIÕ¸¡Õѽ%ÑáµÀìÌäì½Õѽ%ÐÍáÕÑMÉ¥Á "' & $s_TempFile & '"', "", @Õ×ÒQJBBT]  ÌÍÚWÔYB[[Â[ÈÑÜ
BBßU^U
    ][ÝW'&÷"gV÷C²ÂgV÷CµFW&Rv2âW'&÷"vVâG'ærFò&WG&fRFR7W'&VçFDZ她ͽ¹¸ÅÕ½Ðì°Ô¤($)¹Õ¹()Õ¹}]¥¹ÑA½Ì ÀÌØíÍ}]¥¹½Ý9µ°ÀÌØi_Coord)
    
    Local $s_WindowPosition = WinGetPos($s_WindowName)
    
ßSÙÐÞ
Ú[Ù]]J    ÌÍÜ×ÕÚ[ÝÓ[YJK   ÌÍÚWÐÛÛÜ [È ][ÝÈ  V÷C²fײb33c·5õvæF÷u÷6Föå²b33c¶ô6ö÷&EÒ  bW'&÷"FVà 6WDW'½È Ĥ($%IÑÕɸ´Ä(%±Í%ÀÌØí¥}
½½ÉôÀQ¡¸($%IÑÕɸÀÌØíÍ}]¥¹½ÝA½Ítion[0]
    ElseIf $i_Coord = 1 Then
        Return $s_WindowPosition[1]
    [YB[[ÈÏOIÝ×ÕÚ[Ù]ÜÂ

Edit:

Oh forgot to link to the dll that is required for the COM object to work which can be found here:

http://www.pretentiousname.com/gen_scripting/index.html

Edited by FreeFry

Share this post


Link to post
Share on other sites



I had this same thing happen to me.

I was using the default " SendKeyDownDelay"

i changed it to " opt("SendKeyDownDelay",1)"

and my problems went away.

Share this post


Link to post
Share on other sites

lol @

#region Winamp Anti Fuckup Stuff

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