mud409 Posted August 26, 2008 Share Posted August 26, 2008 I have this script setup to change the image on up key or down key, problem is it wont work... Everything works on the script except the part where up and down keys change the image. what am I missing? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <Misc.au3> #include <File.au3> ProcessClose("tray.exe") ProcessClose("ki1.exe") ProcessClose("ki2.exe") Opt("TrayIconHide", 1) HotKeySet("{F10}", "ReleaseMouse") $MousePos = MouseGetPos() _MouseTrap(@DesktopWidth, @DesktopHeight, @DesktopWidth, @DesktopHeight) thatish() Func thatish() Local $msg ;SoundPlay ( @scriptdir & "\sounds\welcome2kc2.wav" ) GUICreate("KI FE", @DesktopWidth, @DesktopHeight, "", "", $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor (0x000000) $pic = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@scriptdir & "\images\kc.bmp", 0, 88, 340, 73) $pic2 = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@scriptdir & "\images\ki1d.gif", 0, 0, 340, 97) $pic3 = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@scriptdir & "\images\ki2d.gif", 0, 155, 340, 97) $hotkeyup = HotKeySet("{UP}", "upems") $hotkeydown = HotKeySet("{Down}", "downems") GUISetState() While 1 Sleep(100) WEnd EndFunc Func upems() HotKeySet("{UP}") HotKeySet("{DOWN}", "downems") HotKeySet("i", "loadems1") HotKeySet("o", "loadems1") HotKeySet("u", "loadems1") HotKeySet("k", "loadems1") HotKeySet("l", "loadems1") HotKeySet("j", "loadems1") HotKeySet("y", "loadems1") HotKeySet("{ENTER}", "loadems1") ish(@scriptdir & "\images\ki1.gif", @scriptdir & "\images\ki2d.gif") EndFunc Func downems() HotKeySet("{UP}", "upems") HotKeySet("{DOWN}") HotKeySet("i", "loadems2") HotKeySet("o", "loadems2") HotKeySet("u", "loadems2") HotKeySet("k", "loadems2") HotKeySet("l", "loadems2") HotKeySet("j", "loadems2") HotKeySet("y", "loadems2") HotKeySet("{ENTER}", "loadems2") ish(@scriptdir & "\images\ki1d.gif", @scriptdir & "\images\ki2.gif") EndFunc Func ish($ki1bmp, $ki2bmp) Guictrlsetimage ($pic2, $ki1bmp) Guictrlsetimage ($pic3, $ki2bmp) endfunc func loadems1() HotKeySet("{Enter}") HotKeySet("i") HotKeySet("o") HotKeySet("u") HotKeySet("k") HotKeySet("l") HotKeySet("j") HotKeySet("y") SoundPlay ( @scriptdir & "\sounds\killerinstinct.wav", 1 ) HotKeySet("{UP}") HotKeySet("{DOWN}") Opt('WinWaitDelay', 10) Run (@scriptdir & "\u64\ki1.exe", "", @SW_HIDE) WinWaitActive ("U64Emu - V3.05") WinSetState ( "U64Emu - V3.05", "", @SW_HIDE ) Opt('WinWaitDelay', 250) ControlFocus ("U64Emu - V3.05", "", "Button2") ControlClick("U64Emu - V3.05", "", "Button2", "left", 1) WinSetState ( "KI FE", "", @SW_HIDE ) Opt('WinWaitDelay', 10) WinWaitActive ("Loading") WinSetState ( "Loading", "", @SW_HIDE ) Opt('WinWaitDelay', 250) Run("tray.exe") endfunc func loadems2() HotKeySet("{Enter}") HotKeySet("i") HotKeySet("o") HotKeySet("u") HotKeySet("k") HotKeySet("l") HotKeySet("j") HotKeySet("y") SoundPlay ( @scriptdir & "\sounds\killerinstinct2.wav", 1 ) HotKeySet("{UP}") HotKeySet("{DOWN}") Opt('WinWaitDelay', 10) Run (@scriptdir & "\u64\ki2.exe", "", @SW_HIDE) WinWaitActive ("U64Emu - V3.05") WinSetState ( "U64Emu - V3.05", "", @SW_HIDE ) Opt('WinWaitDelay', 250) ControlFocus ("U64Emu - V3.05", "", "Button2") ControlClick("U64Emu - V3.05", "", "Button2", "left", 1) WinSetState ( "KI FE", "", @SW_HIDE ) Opt('WinWaitDelay', 10) WinWaitActive ("Loading") WinSetState ( "Loading", "", @SW_HIDE ) Opt('WinWaitDelay', 250) Run("tray.exe") endfunc Func ReleaseMouse() Run("explorer.exe", "c:\windows") Exit EndFunc Link to comment Share on other sites More sharing options...
BrettF Posted August 26, 2008 Share Posted August 26, 2008 Where is the variables $pic1-3 defining a picture control? $pic = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@ScriptDir & "\images\kc.bmp", 0, 88, 340, 73) $pic2 = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@ScriptDir & "\images\ki1d.gif", 0, 0, 340, 97) $pic3 = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD)) GUICtrlCreatePic(@ScriptDir & "\images\ki2d.gif", 0, 155, 340, 97) I think you know now. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
mud409 Posted August 26, 2008 Author Share Posted August 26, 2008 ahhhhhh, I'm retarded, thanks... 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