Misha Posted April 14, 2006 Share Posted April 14, 2006 (edited) Func AutoPicker () GuiCtrlSetData( $AutoPickerButton, "Stop Picking") $PickerWhile = 0 $AutoPicker = 1 While $PickerWhile = 0 GuiCtrlSetOnEvent( $AutoPickerButton, "ExitPicker") sleep($Slide) WinActivate ("Classname=Shell_TrayWnd") Send(" ",1) WinActivate ("Classname=Shell_TrayWnd") Send("{BACKSPACE}") WEnd EndFunc Func ExitPicker () $PickerWhile = 1 GuiCtrlSetData( $AutoPickerButton, "Start Picking") GuiCtrlSetOnEvent( $AutoPickerButton, "AutoPicker") EndFunc Edited April 14, 2006 by Misha Link to comment Share on other sites More sharing options...
GaryFrost Posted April 14, 2006 Share Posted April 14, 2006 is there a question in this somewhere? if there is, you'll need to provide more info, like the problem/question and maybe even more script. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Misha Posted April 14, 2006 Author Share Posted April 14, 2006 it enters the while but can not exit...I think it cant get to the guictrlsetonevent.. help Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 this will so the trick expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Dim $Slide = 100, $PickerWhile GUICreate("MY GUI") $AutoPickerButton = GUICtrlCreateButton("Start Picking", 150, 150, 150, 20) GUICtrlSetOnEvent($AutoPickerButton, "AutoPicker") GUISetState() While 1 Sleep(10) While $PickerWhile = 0 sleep($Slide) WinActivate ("Classname=Shell_TrayWnd") Send(" ",1) WinActivate ("Classname=Shell_TrayWnd") Send("{BACKSPACE}") WEnd WEnd Func AutoPicker () GuiCtrlSetData( $AutoPickerButton, "Stop Picking") GuiCtrlSetOnEvent( $AutoPickerButton, "ExitPicker") $PickerWhile = 0 $AutoPicker = 1 EndFunc Func ExitPicker () $PickerWhile = 1 GuiCtrlSetData( $AutoPickerButton, "Start Picking") GuiCtrlSetOnEvent( $AutoPickerButton, "AutoPicker") EndFunc @gafrost... i saw the other post and helped before 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now