JoshDB Posted May 22, 2006 Share Posted May 22, 2006 Hey guys, I'm trying to move an image around my GUI, but a flicker is caused. Is there any way to stop this? ~joshdb Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
Valuater Posted May 22, 2006 Share Posted May 22, 2006 Hey guys, I'm trying to move an image around my GUI, but a flicker is caused.Is there any way to stop this? ~joshdbturn it off!!!lol8) Link to comment Share on other sites More sharing options...
GaryFrost Posted May 22, 2006 Share Posted May 22, 2006 some script would help 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...
JoshDB Posted May 22, 2006 Author Share Posted May 22, 2006 (edited) expandcollapse popup#include <GUIConstants.au3> HotKeySet("{F4}","Terminate") Global $LastAction = 0 Global $Wait = 0 Global $FaceExp[b][/b]ressions[10] $FaceExp[b][/b]ressions[0] = "Face_Smile.jpg" $FaceExp[b][/b]ressions[1] = "Face_Smile_Blink_L.jpg" $FaceExp[b][/b]ressions[2] = "Face_Smile_Blink_R.jpg" WinSetState(WinGetHandle("classname=Shell_TrayWnd"), "", @SW_HIDE) DllCall("user32.dll", "int", "ShowCursor", "int", 0);HIDE CURSOR GUICreate("",@DesktopWidth,@DesktopHeight,0,0,$WS_POPUP + $WS_SYSMENU + $WS_MINIMIZEBOX) GUISetBkColor(0x000000) GUICtrlCreateLabel("",0,0,@DesktopWidth,@DesktopHeight) GUICtrlSetColor(-1,0x000000) $Face = GUICtrlCreatePic($FaceExp[b][/b]ressions[0],@DesktopWidth/2-200/2,@DesktopHeight-200/2,200,200) GUISetState() Say("Hello") $Timer = TimerInit() While 1 If $Wait = 0 Then $LastAction = $LastAction + Round(Random(2,5)) $Wait = 1 EndIf If Round(TimerDiff($Timer)) >= $LastAction Then GUICtrlSetImage($Face,$FaceExp[b][/b]ressions[Round(Random(1,2))]) Sleep(100) GUICtrlSetImage($Face,$FaceExp[b][/b]ressions[0]) $LastAction = Round(TimerDiff($Timer)) + Round(Random(2,5)) $Wait = 0 EndIf WEnd GUIDelete() WinSetState(WinGetHandle("classname=Shell_TrayWnd"), "", @SW_SHOW) Func Terminate() Exit EndFunc Func Say($sText) $tempFile = @TempDir & '\talktemp.vbs' ; Set the temp file FileWriteLine($tempFile, 'Dim Talk' & @CRLF & _ 'Set Talk = WScript.CreateObject("SAPI.SpVoice")' & _ @CRLF & 'Talk.Speak "' & $sText & '"'); Add contents to the temp file RunWait('Wscript.exe talktemp.vbs', @TempDir); Run the VBScript FileDelete($tempFile) EndFunc Edited May 22, 2006 by jpm Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
Valuater Posted May 22, 2006 Share Posted May 22, 2006 (edited) 1 please use code blocks to post code [ code] ; no space ; paste code [ /code] ; no space 2 I notice a label that is not being used try removing this GUICtrlCreateLabel("",0,0,@DesktopWidth,@DesktopHeight) GUICtrlSetColor(-1,0x000000) 3 you are using Round(Random(1,2) just use Random(1,2,1) 8) Edited May 22, 2006 by Valuater Link to comment Share on other sites More sharing options...
jpm Posted May 22, 2006 Share Posted May 22, 2006 No GUICtrlSetPos in your script 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