Chattah Posted September 21, 2007 Posted September 21, 2007 Hey guys I've been playing with AutoIT now for about a month using it mostly to automate some boring tasks at work. Well recently I have decided to mess around with other aspects of it and here lies my issue. I'm trying to create an animated pac man that will eventually run around the screen and eat things. I have been unable so far to either reduce or eliminate the flicker that happens when my pac man opens and closes his mouth. Any help would be appreciated. CODE#include <GUIConstants.au3> HotKeySet("{ESC}", "_zExitScript") GUICreate("Renee1", 600, 600, -1, -1, BitOR($WS_SYSMENU,$WS_POPUPWINDOW,$WS_BORDER,$GUI_ONTOP), $WS_EX_STATICEDGE+$WS_EX_TOPMOST) GUISetBkColor(0x000000) $pac_mouth_size = 270; This is the size of the mouth $pac_mouth_angle = 30; This is the angle the mouth starts at reduce this for proper effect Do GUISetState(@SW_SHOW) Sleep(100) GuiCtrlCreateGraphic(220, 10) GUICtrlSetGraphic(-1,$GUI_GR_COLOR, 0, 0xFFFF00) GUICtrlSetGraphic(-1,$GUI_GR_PIE, 50,50, 30,$pac_mouth_angle,$pac_mouth_size) GUICtrlSetState(-1, $GUI_GR_REFRESH) $pac_mouth_size = $pac_mouth_size + 4 $pac_mouth_angle = $pac_mouth_angle - 2 Until $pac_mouth_size >= 350 Do GUISetState(@SW_SHOW) Sleep(100) GuiCtrlCreateGraphic(220, 10) GUICtrlSetGraphic(-1,$GUI_GR_COLOR, 0, 0xFFFF00) GUICtrlSetGraphic(-1,$GUI_GR_PIE, 50,50, 30,$pac_mouth_angle,$pac_mouth_size) GUICtrlSetState(-1, $GUI_GR_REFRESH) $pac_mouth_size = $pac_mouth_size - 4 $pac_mouth_angle = $pac_mouth_angle + 2 Until $pac_mouth_size <= 270 While 1 Sleep(100) WEnd Func _zExitScript() Exit EndFunc
Bert Posted September 22, 2007 Posted September 22, 2007 I played with it for a bit, and I had no luck. pretty kewl though.. The Vollatran project My blog: http://www.vollysinterestingshit.com/
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