Jump to content

AppTux

Active Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by AppTux

  1. When I start the program, the CPU goes to 100% usage... Can't you just make a bit more sleeps in it???
  2. Because it doesn't recognize or whatever iTunes, I can't use the next/previous/play hotkeys without getting a error....
  3. I get this error: >Running AU3Check (1.54.19.0) from:D:\AutoIt3 E:\AutoIt\VolumeControl.au3(159,22) : WARNING: $iTunesApp: possibly used before declaration. $iTunesApp.PlayPause ~~~~~~~~~~~~~~~~~~~~^ E:\AutoIt\VolumeControl.au3(159,22) : ERROR: $iTunesApp: undeclared global variable. $iTunesApp.PlayPause ~~~~~~~~~~~~~~~~~~~~^ E:\AutoIt\VolumeControl.au3 - 1 error(s), 1 warning(s) !>21:18:38 AU3Check ended.rc:2 Well, I just continue, but your meter is a bit too big, so it goes over your meter. Just make the meter smaller: $a = _CreateLevelMeter(0,0,False,20,5,20,0xFFFFFF,0x0000FF) ; Create volume meter And I prefer a less transparent window, to transparency of 200... Edit: I wrote that the button was too big, it was the meter
  4. And can you explain exactly what you mean with "are not always on top"??? You mean that if you press Start+Tab and switch to another program??? I think that's also possible with WinSetOnTop("WindowSlideToUnlock]", "", 1);the main window WinSetOnTop("HH", "", 1);slider window WinSetOnTop("Overlay", "", 1);Overlay window This works not total properly because if you switch to another window, you see the other window, but if you click or whatever, the PS2U window come again in the front of your screen. Edit: I found that the overlay and slider window are still in front of the other windows... I'm gonna try to get it working. Edit2: Just add this line in the While: If Not WinActive ($MGUI,"") Then WinActivate ($MGUI,"")
  5. True, that's also possible, but I had this solution: $wSlide = GUICreate("HH", 60, 45, 22.5, $SH - 147.5, $WS_POPUP, $WS_EX_TOPMOST) And I set in the While: WinSetOnTop($wSlide, "", 1) Mine also works, but I can't say anything else than that yours is better
  6. Thank you, It worked, but it was a bit illogical
  7. I think you have to replace this with this: WinMove($wSlide,"HH", "", $SW - 82.5, $SH - 147.5) It works now, but on my computer it's a bit weird fade out, I think I'm gonna do the same animation in the begin of the program..
  8. Thanks for your reply; I think it's possible to hold it a short time right and unlock it then, today I can't do it anymore, but tomorrow I'll try and update the code. First I was going to do a single window for the slider, but it's a lot of work and code to do it. The minor problem of that is the y position on the screen. I haven't enough experience with that, but I'll try to make it work good. And the distance of the movement of the slider: That's possible and not too much work in the code. I'll do it tomorrow! About the last animations: what about the same animation in the begin???
  9. I made this program a while ago, it's a program what shows a screen with a slider so you can 'unlock' your computer. Things annoying me: - Fade in is slow on my PC, but I heard from other people it's not on theirs. - Timer so you have to hold it right for a few seconds still doesn't work. Things I want to do: - Password usage (HALF DONE see Edit 15-02-2011) - Let the window always stay on top (DONE) If you know how to fix it or you have any suggestions, please let me know!! Together we can make it way better If you don't understand something of the code, let me know and I'll explain. EDIT: News: I'm gonna rewrite the whole code. So any help will be appreciated! Code and Images: PS2U.zip EDIT: Made the slider bar a bit smaller for lazy guys. End animations same as the start animations Please use the updated code below this instead of the one in the attachment or you won't have the edited parts. EDIT 14-02-2011: -The Bars are a bit transparent; -The program don't use screenshots anymore: The bars are a window with transparency of 250, the 'overlay' so you can't touch the windows behind has a transparency of 1 -Deleted some comments EDIT/UPDATE 15-02-2011: -Added Password protection (still hard coded in script, so it's easy to hack so far gonna make it better in next version ) -Window always stays on top I think I'm gonna focus on the clarity of the code, because in my opinion the code is not so clear The most updated code: (not included in the .zip, just too lazy for that) #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GUIEdit.au3> #include <StaticConstants.au3> #include <String.au3> #include <WinAPI.au3> #include <Timers.au3> Global $SW = @DesktopWidth, $SH = @DesktopHeight, $PwdOpen = 0, $Password = "1234" $MGUI = GUICreate("WindowSlideToUnlock", $SW, $SH, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $MGUI) $TOPBACK = GUICtrlCreatePic("Data\s2u-b-b.bmp", 0, 0, $SW, 50) $BOTTOMBACK = GUICtrlCreatePic("Data\s2u-u-b.bmp", 0, $SH - 250, $SW, 250) $BARLEFT = GUICtrlCreatePic("Data\s2u-b-l.bmp", 197.5, $SH - 151, 21, 52) $BARMIDDLE = GUICtrlCreatePic("Data\s2u-b-m.bmp", 218.5, $SH - 151, $SW - 437, 52) $BARRIGHT = GUICtrlCreatePic("Data\s2u-b-r.bmp", $SW - 223.5, $SH - 151, 21, 52) $BARLABEL = GUICtrlCreateLabel("Fill in Password", 200, $SH - 151, $SW - 400, 52, $SS_NOTIFY & $SS_CENTER) $TIME = GUICtrlCreateLabel("", ($SW - 100) /2, 2, 100, 45, $SS_NOTIFY & $SS_CENTER) $ARROW = GUICtrlCreatePic("Data\s2u-b-sign.bmp", ($SW - 35) /2,$SH -250,35,35) _SETSTATEANDFONT() _SETTHETIME() WinSetTrans($MGUI, "", 0) ;---Create overlay window so you can't touch the window behind $OVERLAY = GUICreate("Overlay",$SW,$SH - 300,0, 50, $WS_POPUP, $WS_EX_TOPMOST, $MGUI) WinSetTrans($OVERLAY, "",1) GUISetState(@SW_SHOW, $OVERLAY) $TOPRGN = _WinAPI_CreateRectRgn(0,0,$SW,50) $BOTTOMRGN = _WinAPI_CreateRectRgn(0,$SH - 250,$SW, $SH) _WinAPI_CombineRgn($TOPRGN, $TOPRGN, $BOTTOMRGN,$RGN_OR) _WinAPI_SetWindowRgn($MGUI,$TOPRGN) GUISetState(@SW_SHOW, $MGUI) $PwdGui = GUICreate("Password input",250,100,-1,$SH - 348, $WS_POPUP, $WS_EX_TOPMOST, $MGUI) GUISetBkColor(0x000000,$PwdGui) $PwdBack = GUICtrlCreatePic("Data\s2u-p-b.bmp",0,0,250,100, $GUI_DISABLE) $PwdInput = GUICtrlCreateInput("", 25,10,200,60, BitOR ($ES_PASSWORD,$SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetLimit (-1,4) GUICtrlSetBkColor (-1,0xFFFFFF) GUICtrlSetFont (-1, 35-1,"","Lucida Sans") GUICtrlSetColor (-1, 0x000000) WinSetTrans("Password input","",250) GUISetState(@SW_HIDE, $PwdGui) $wSlide = GUICreate("HH", 60, 45, 200, $SH - 147.5, $WS_POPUP, $WS_EX_TOPMOST, $MGUI) $slider = GUICtrlCreatePic("Data\s2u-b-u.bmp", 0, 0, 60, 45) WinSetTrans($wSlide,"",0) GUISetState(@SW_HIDE, $wSlide) For $TRANS = 0 To 250 Step 15 WinSetTrans($wSlide, "", $TRANS) WinSetTrans($MGUI, "", $TRANS) If $TRANS >= 250 Then ExitLoop EndIf Next WinSetTrans($MGUI, "", 250) While 1 If $PwdOpen = 0 Then If Not WinActive ($MGUI,"") Then WinActivate ($MGUI,"") Else If Not WinActive ($PwdGui,"") Then WinActivate ($PwdGui,"") EndIf If StringLen(GUICtrlRead($PwdInput)) = 4 Then If GUICtrlRead($BARLABEL) <> "Slide To Unlock" Then GUICtrlSetData($BARLABEL,"Slide To Unlock") GUISetState(@SW_SHOW, $wSlide) EndIf Else If GUICtrlRead($BARLABEL) <> "Fill in Password" Then GUICtrlSetData($BARLABEL,"Fill in Password") GUISetState(@SW_HIDE, $wSlide) EndIf EndIf _SETTHETIME() $MINFO = GUIGetCursorInfo($wSlide) $hMsg = GUIGetMsg() If $hMsg = $ARROW Then _ShowPassWord() ElseIf $hMsg = $GUI_EVENT_CLOSE Then Exit EndIf If $MINFO[4] = $slider Then $POS = 1 $MINFO = GUIGetCursorInfo($wSlide) While $MINFO[4] = $slider $MINFO = GUIGetCursorInfo($wSlide) If $MINFO[2] = 1 Then $MINFO = GUIGetCursorInfo($wSlide) $MPOS = MouseGetPos() ConsoleWrite($MPOS[0] & @CRLF) $CONTROLPOS = $MPOS[0] - 200 While $MINFO[2] = 1 $MINFO = GUIGetCursorInfo($wSlide) $POS = MouseGetPos() $POS = $POS[0] - $CONTROLPOS If $POS <= 200 Then WinMove("HH", "", 200, $SH - 147.5) ElseIf $POS >= $SW - 265 Then WinMove($wSlide, "", $SW - 265, $SH - 147.5) _Timer_SetTimer($MGUI,1000, _SLIDEFULL(),-1) Else WinMove("HH", "", $POS, $SH - 147.5) EndIf Sleep(5) WEnd Do WinMove("HH", "", $POS, $SH - 147.5) $POS = $POS - 40 Sleep(5) Until $POS <= 200 WinMove("HH", "", 200, $SH - 147.5) EndIf Sleep(10) WEnd EndIf Sleep(1) WEnd Func _ShowPassWord() ConsoleWrite("_ShowPassWord() function called"&@CR) If $PwdOpen = 0 Then GUICtrlSetImage($ARROW,"Data\s2u-b-sign-inverse.bmp") GUISetState(@SW_SHOW, $PwdGui) $PwdOpen = 1 ElseIf $PwdOpen = 1 Then GUICtrlSetImage($ARROW,"Data\s2u-b-sign.bmp") GUISetState(@SW_HIDE, $PwdGui) $PwdOpen = 0 EndIf EndFunc Func _SETSTATEANDFONT() GUICtrlSetColor($BARLABEL, 0x373737) GUICtrlSetBkColor($BARLABEL, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont($BARLABEL, 21, 400, "", "Lucida Sans") GUICtrlSetBkColor($TIME, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont($TIME, 20, 400, "", "Lucida Sans") GUICtrlSetColor($TIME, 0xFFFFFF) For $X = $TOPBACK To $BARRIGHT GUICtrlSetState($X, $GUI_DISABLE) Next EndFunc ;==>_SETSTATEANDFONT Func _SETTHETIME() $MIN = @MIN $HOUR = @HOUR $T = GUICtrlRead($TIME) If $T <> $HOUR &":"& $MIN Then GUICtrlSetData($TIME, $HOUR&":"&$MIN) EndIf EndFunc ;==>_SETTHETIME Func _SLIDEFULL() If GUICtrlRead($PwdInput) = $Password Then GUISetState(@SW_HIDE, $PwdGui) $TRANS = 250 For $TRANS = 250 To 0 Step -25 WinSetTrans($wSlide, "", $TRANS) WinSetTrans($MGUI, "", $TRANS) ConsoleWrite($TRANS&@CR) If $TRANS <= 0 Then ExitLoop EndIf Next Exit Else $PwdOpen = 0 _ShowPassWord() GUICtrlSetBkColor($PwdInput,0xbb0000) EndIf EndFunc ;==>_SLIDEFULL For the 2nd time: Suggestions are welcome!! All the files are in the Attachments
  10. Modified code: #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <StaticConstants.au3> #include <GuiTreeView.au3> #include <GuiImageList.au3> #include <String.au3> $DRIVE = DriveGetDrive("FIXED") $DREM = DriveGetDrive("REMOVABLE") Global $FIXED[$DRIVE[0]+1], $REMOVABLE[$DREM[0]+1], $fDblClk = False $MGUI = GUICreate("WindowsDrive", 150, 425, -1, -1) $PCF = GUICtrlCreateLabel("Displays name of selected item", 0, 377, 150, 45, $SS_NOTIFY) GUICtrlSetBkColor($PCF, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont($PCF, 9, 400, "", "Segoe UI") GUISetState() ;---Treeview---Why here? Otherwise it won't be displayed; $TRVI = GUICtrlCreateTreeView(0, 0, 150, 375) $TRVIMG = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-drive-icon.ico", 0);harddrive icon _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-removable-icon.ico", 0);removable media icon _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-wait-icon.ico", 0);please wait icon _GUICtrlTreeView_SetNormalImageList($TRVI, $TRVIMG) $PLWA = _GUICtrlTreeView_Add($TRVI, 0, "Please wait...",2,2) _GUICtrlTreeView_BeginUpdate($TRVI) $TVD = _GUICtrlTreeView_Add($TRVI, 0, "Hard disks", 0, 0) $TVR = _GUICtrlTreeView_Add($TRVI, 0, "Removable media", 1, 1) For $X = 1 To $DRIVE[0] ConsoleWrite("$DRIVE["&$X&"]"&@CR) If $X > 7 Then ExitLoop $DLETTER = _StringProper($DRIVE[$X]) $LABEL = DriveGetLabel($DRIVE[$X]) If $LABEL = "" Then $TXT = $DLETTER Else $TXT = $DLETTER & " " & $LABEL EndIf $FIXED[$X] = GUICtrlGetHandle(_GUICtrlTreeView_AddChild($TRVI, $TVD, $TXT, 0, 0)) ;$FIXED[$X] = _GUICtrlTreeView_AddChild($TRVI, $TVD, $TXT, 0, 0) Next For $X = 1 To $DREM[0] If $X > 10 Then ExitLoop $DLETTER = _StringProper($DREM[$X]) $LABEL = DriveGetLabel($DREM[$X]) If $LABEL = "" Then $TXT = $DLETTER Else $TXT = $DLETTER & " " & $LABEL EndIf $REMOVABLE[$X] = _GUICtrlTreeView_AddChild($TRVI, $TVR, $TXT, 1, 1) Next _GUICtrlTreeView_Delete($TRVI,$PLWA) _GUICtrlTreeView_EndUpdate($TRVI) _GUICtrlTreeView_Expand($TRVI, 0, True) _GUICtrlTreeView_SelectItem($TRVI, $TVD) ;---==>End of Treeview---; GUIRegisterMsg($WM_NOTIFY, "MY_WM_NOTIFY") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect If $fDblClk = True Then $sText = _GUICtrlTreeView_GetText($TRVI, _GUICtrlTreeView_GetSelection($TRVI)) _SetTheData($sText) $fDblClk = False EndIf WEnd Func _SetTheData($sTXT) GUICtrlSetData($PCF,$sTXT);with this name can I go on with displaying it EndFunc Func MY_WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Switch $wParam Case $TRVI Local $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return If DllStructGetData($tagNMHDR, 3) = $NM_DBLCLK Then $fDblClk = True EndSwitch EndFunc ;==>MY_WM_NOTIFY I hope you now understand what I meant.
  11. Thanks!!! This works perfect for me. Now I get the name of the selected treeviewitem, now can I make a function what's reading the name of the item, and put the right content on the right place. I'll modify my script so you can understand what I wanted. I'll post soon! AppTux
  12. Sorry for that, I'm not often on this forum, so I don't think about that things... I'm sorry. I'll try to make a working script including the 'missing' code AppTux
  13. I'm making a program for reading all the drives etc. I made a treeview with the fixed drives and the removable drives. Now, I want to make it that if you click by example the C: drive in the treeview, you see a different content instead of before you clicked it. But because every pc has another count of drives, I made a array with max 7 fixed disks. With the functions I used, the GUIGetMsg() won't work on the items in the treeview. What should be used to check if the item is clicked. How can I make a loop or whatever to make it possible to check only for the used items? Otherwise you get always a msg. My code so far: $TRVI = GUICtrlCreateTreeView(7, 95, 150, 375) $TRVIMG = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-drive-icon.ico", 0) _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-removable-icon.ico", 0) _GUIImageList_AddIcon($TRVIMG, "Data\wdrive-wait-icon.ico", 0) _GUICtrlTreeView_SetNormalImageList($TRVI, $TRVIMG) $PLWA = _GUICtrlTreeView_Add($TRVI, 0, "Please wait...",2,2) _GUICtrlTreeView_BeginUpdate($TRVI) $TVD = _GUICtrlTreeView_Add($TRVI, 0, "Hard disks", 0, 0) $TVR = _GUICtrlTreeView_Add($TRVI, 0, "Removable hardware", 1, 1) $DRIVE = DriveGetDrive("FIXED") $DREM = DriveGetDrive("REMOVABLE") For $X = 1 To $DRIVE[0] If $X > 7 Then ExitLoop $DLETTER = _StringProper($DRIVE[$X]) $LABEL = DriveGetLabel($DRIVE[$X]) If $LABEL = "" Then $TXT = $DLETTER Else $TXT = $DLETTER & " " & $LABEL EndIf $FIXED[$X] = _GUICtrlTreeView_AddChild($TRVI, $TVD, $TXT, 0, 0) Next For $X = 1 To $DREM[0] If $X > 10 Then ExitLoop $DLETTER = _StringProper($DREM[$X]) $LABEL = DriveGetLabel($DREM[$X]) If $LABEL = "" Then $TXT = $DLETTER Else $TXT = $DLETTER & " " & $LABEL EndIf $REMOVABLE[$X] = _GUICtrlTreeView_AddChild($TRVI, $TVR, $TXT, 1, 1) Next _GUICtrlTreeView_Delete($TRVI,$PLWA) _GUICtrlTreeView_EndUpdate($TRVI) _GUICtrlTreeView_Expand($TRVI, 0, True) _GUICtrlTreeView_SelectItem($TRVI, $TVD) ;---==>End of Treeview---; I still have no code for getting message from the items. I really hope you understand what I mean. Thanks in advance, Apptux
  14. Now I tried it with ControlMove() It works perfect!!! It perfectly smooth.
  15. @JoHanatCent Then it's not the same slide to unlock like the iPhone's; like this: That's how it's meaned @Zedna I tried it, but no effect. It's also blinking with the slide back if you haven't slided it to the end. Any other idea's?
  16. I don't know how to get the previous coords of the control in a while, any idea? Because in a while it's always resetting...
  17. I'll try!
  18. I made a kind of 'slide to unlock' for Windows. It works, but one problem: not smooth. My code so far: $UL is the slide image. While 1 $hMSG = GUIGetCursorInfo($MGUI) If $hMSG[4] = $UL Then $pos = 1 $hMSG = GUIGetCursorInfo($MGUI) While $hMSG[4] = $UL $hMSG = GUIGetCursorInfo($MGUI) If $hMSG[2] = 1 Then $hMSG = GUIGetCursorInfo($MGUI) $p = MouseGetPos() $pc = $p[0] -22.5 While $hMSG[2] = 1 $hMSG = GUIGetCursorInfo($MGUI) $pos = MouseGetPos() $pos = $pos[0] - $pc GUICtrlSetPos($UL,$pos,$sh - 147.5) If $pos >= $sw - 82.5 Then GUICtrlSetPos($UL,$pos,$sh - 147.5) Exit ElseIf $pos <= 20 Then GUICtrlSetPos($UL,$pos,$sh-147.5) ExitLoop EndIf Sleep(5) WEnd Do GUICtrlSetPos($UL,$pos,$sh-147.5) $pos = $pos - 40 Sleep(5) Until $pos <= 22.5 GUICtrlSetPos($UL,22.5,$sh-147.5) EndIf Sleep(10) WEnd EndIf WEnd A lot of code, but it's needed to get the position on the control etc. Is it possible to make it nice smooth, and how to do? EDIT: Now I use ControlMove() instead of GUICtrlSetPos(). It works smooth.
  19. Thanks for the answer, but because of homework I can't try it now. I'll try it as fast as possible.
  20. Well, I think that's not a very useful for a close button (like a button with "X" in windows). It also have to close when the window isn't active, but there's no window in top of that (like the window beside of a active window). I think I have to do something with GUIGetMSG before the "If $hMSG[2] = 1 Then". But I don't think how I have to process that in the script...
  21. First of all, sorry for the strange topic name. I've got a GUI window with my own buttons en close buttons. Control $bCLO = GUICtrlCreatePic("Data\wrun-close-n.bmp",320,1,25,25) Script While 1 $hMSG = GUIGetCursorInfo($MGUI) Switch $hMSG[4] Case $bCLO _HoverClose() EndSwitch WEnd Func _HoverClose() GUICtrlSetImage($bCLO,"Data\wrun-close-h.bmp");set the hover pic $hMSG = GUIGetCursorInfo($MGUI);get again the cursorinfo While $hMSG[4] = $bCLO;while cursor is over the control $hMSG = GUIGetCursorInfo($MGUI);continuely get cursor info Sleep(10);Be nice to your CPU!! If $hMSG[2]=1 Then;If the primary button is pressed, but not released GUICtrlSetImage($bCLO,"Data\wrun-close-p.bmp");set the press pic $hMSG = GUIGetCursorInfo($MGUI);get again the cursor info While $hMSG[2] = 1;while the primary button is pressed $hMSG = GUIGetCursorInfo($MGUI);get again cursor info Sleep(10);Be nice to you CPU!! If $hMSG[4] <> $bCLO Then;If cursor isn't again on control $El = 1;Exitloop variable is 1 ExitLoop;Exit the while Else $El = 0;exitloop is 0 EndIf WEnd;end of while If $El = 0 Then;if exitloop is 0, so if the cursor isn't again on control GUICtrlSetImage($bCLO,"Data\wrun-close-h.bmp");set the hover pic exit;close the program ElseIf $El = 1 Then;or exitloop =1 ExitLoop;exit the while and then is the normal pic again set EndIf EndIf WEnd;end of while GUICtrlSetImage($bCLO,"Data\wrun-close-n.bmp");set normal pic EndFunc ;==> HoverClose() Yes, I know, it's a pretty stupid code, but it works; and I hope I explained it good enough. The question: If I have a window that's in front of the window; if I then go over the area where the close button is, click and release, the program exits!! How can I prevent this?? AppTux EDIT: now I used GUIGetMSG() before it's checking if the primary button is pressed. Look at the edited code: While 1 $hMSG = GUIGetCursorInfo($MGUI) Switch $hMSG[4] Case $bCLO _HoverClose() EndSwitch WEnd Func _HoverClose() GUICtrlSetImage($bCLO,"Data\wrun-close-h.bmp");set the hover pic $hMSG = GUIGetCursorInfo($MGUI);get again the cursorinfo While $hMSG[4] = $bCLO;while cursor is over the control $hMSG = GUIGetCursorInfo($MGUI);continuely get cursor info $MSG = GUIGetMSG() Sleep(10);Be nice to your CPU!! If $MSG = $bCLO Then If $hMSG[2]=1 Then;If the primary button is pressed, but not released GUICtrlSetImage($bCLO,"Data\wrun-close-p.bmp");set the press pic $hMSG = GUIGetCursorInfo($MGUI);get again the cursor info While $hMSG[2] = 1;while the primary button is pressed $hMSG = GUIGetCursorInfo($MGUI);get again cursor info Sleep(10);Be nice to you CPU!! If $hMSG[4] <> $bCLO Then;If cursor isn't again on control $El = 1;Exitloop variable is 1 ExitLoop;Exit the while Else $El = 0;exitloop is 0 EndIf WEnd;end of while If $El = 0 Then;if exitloop is 0, so if the cursor isn't again on control GUICtrlSetImage($bCLO,"Data\wrun-close-h.bmp");set the hover pic exit;close the program ElseIf $El = 1 Then;or exitloop =1 ExitLoop;exit the while and then is the normal pic again set EndIf EndIf EndIf WEnd;end of while GUICtrlSetImage($bCLO,"Data\wrun-close-n.bmp");set normal pic EndFunc ;==> HoverClose()
  22. It's all not what i wanted. It was only a question if it's possible. Well, it's not easy to do, so...
  23. it's not meaned as a keylogger but a kind of keycounter
  24. Is there a function to get the keyboard clicks? I've found nothing..
  25. thank you very much. this was very helpful!
×
×
  • Create New...