Search the Community
Showing results for tags 'slide'.
Found 3 results
I have been trying to get a progress bar to, well, progress. I have looked at several scripts on here and most of them relate to copying files across, which I do not want to do. I tried chopping it up to suit my needs, but just break them. I simply want the user to press the "Start" button and the bar to run for a few seconds (15 or 20 seconds. Less is fine), then show them a completed message. Here is what I have so far: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Opt("GUIOnEventMode", 1) $Form1_1 = GUICreate("Form1", 506, 223, 236, 128) $Exit = GUICtrlCreateButton("Exit", 336, 144, 129, 41) GUICtrlSetOnEvent($GUI_EVENT_CLOSE, "close"); $Button1 = GUICtrlCreateButton("Start", 184, 144, 129, 41) GUISetState (@SW_SHOW) $Progress1 = GUICtrlCreateProgress(16, 104, 465, 17) GUISetState() #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Exit EndSwitch WEnd $wait = 20 $s = 0 do $nmsg = GUIGetMsg() If $nmsg = $Button1 Then For $i = $s To 100 If GUICtrlRead($progress1) = 100 Then Msgbox(0,"Info","Complete!", 1) $m = GUIGetMsg () If $m = -3 Then ExitLoop $s=0 GUICtrlSetData ($progress1,$i) Sleep($wait) Next if $i >100 then endif EndIf until $nmsg = $GUI_EVENT_CLOSE func close () Exit EndFunc Pressing the exit button works fine. The bar is there, but no progress shows. It's more for the user so they know something is happening. All I want it to do is turn green from start to finish when "Start" is pressed. I am very new and I know the aesthetics need work, but I just need to get over this hurdle first. Thanks for any help on this one. I have had nothing but wonderful help from this community in the past! Thanks in advance
Hey! Is it possible to let a GUI slide in from the right bounds of the desktop? I am making a settings-GUI where all necessary settings can easily be done in one window When my mouse reaches a zone on the right of my desktop, a GUI should slide in... I achieved this some time ago with a single control of a GUI... GUICtrlSetPos; But there is no GUISetPos Function... Can i achieve this in any other way? Or do you know better ways to bring this GUI to my screen?
Hello all, Here is an update of this topic: I did the transition based on a real time input. Thus, if you put 200ms the transition will be made in reel 200ms (+~10ms on my PC) From my first post (see link) just replace: For $a = 0 To 254 Step $speed WinSetTrans($hGDI[$d], "", $a) Sleep($delay) Next by: $ms = 200 ; set your time (ms) $step = $ms/255 $TimerInit=TimerInit() $i=1 $p = 1 $Diff=$step $TimerInit2=TimerInit() While 1 If $i > 254 Then ExitLoop If $Diff >= $step And $p And $i < 256 Then WinSetTrans($hGDI[$d], "", int($i)) $i += 1 $TimerInit=TimerInit() $p = 0 Else Do $Diff=TimerDiff($TimerInit) Until $Diff >= $step $p=1 EndIf WEnd $Diff2=TimerDiff($TimerInit2) ConsoleWrite("+ "&$Diff2 & @LF) Of course you won't need $speed and $delay. I wonder if it is working nice on your PC as well ? Cramaboule