Pakku Posted May 1, 2006 Share Posted May 1, 2006 hi, how do i get this to work when i click on the button with the text test, it does nothing can someone help? expandcollapse popup#include<GUIConstants.au3> Opt("GUICloseOnESC",1) Opt("GUIOnEventMode", 1) Opt("RunErrorsFatal", 0) Opt("TrayAutoPause", 0) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode",1) Opt("OnExitFunc", "close") GUICreate("my proggie",600,400) $tray_start = TrayCreateItem("Start") TrayItemSetOnEvent($tray_start,"close") $tray_status = TrayCreateItem("Status") TrayItemSetOnEvent($tray_status,"close") $tray_instellingen = TrayCreateItem("Instellingen") TrayItemSetOnEvent($tray_instellingen,"close") $tray_afsluiten = TrayCreateItem("Afsluiten") TrayItemSetOnEvent($tray_afsluiten,"close") TraySetIcon("Clean XP Pro.ico") GUISetBkColor(0xFFFFFF) GUISetIcon("icon.ico") GUICtrlCreatePic("balk1.jpg",0,0,600,100) $help = GUICtrlCreatePic("balk2.jpg",0,350,600,50) GUICtrlCreatePic("balk3.jpg",575,100,25,250) GUICtrlCreatePic("balk3.jpg",0,100,25,250) GUICtrlCreatePic("balk4.jpg",300 - 154,60,308,40) GUISetOnEvent($GUI_EVENT_CLOSE, "close") $btn_start = GUICtrlCreateButton("test",200,375) GUICtrlSetOnEvent($btn_start,"test") GUISetState(@SW_SHOW) While 1 WEnd Func test() MsgBox(0,"","") EndFunc Func close() Exit EndFunc Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 1, 2006 Moderators Share Posted May 1, 2006 (edited) It goes to the msgbox() in test() for me, but then I don't have your pictures either. If you comment the pictures out, what happens? Edit: Try giving each of your GUICtrlCreatPic()'s a variable name, then before you call GUISetState(), disable them. Edited May 1, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted May 1, 2006 Share Posted May 1, 2006 to slow CPU useage... place a sleep in your loop While 1 Sleep(10) WEnd 8) Link to comment Share on other sites More sharing options...
Pakku Posted May 1, 2006 Author Share Posted May 1, 2006 the pictures are the problem, the script works fine without the picture but not with the pictures. i think it has something to do with the syles or something. Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Pakku Posted May 1, 2006 Author Share Posted May 1, 2006 (edited) thanks Valuater i'll do that but the problem isn't resolved... Arjan Edited May 1, 2006 by arjan staring How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Valuater Posted May 1, 2006 Share Posted May 1, 2006 GuiCtrlSetState( -1, $GUI_DISABLE) just after creating a pic ( that you are not using for input ) 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 1, 2006 Moderators Share Posted May 1, 2006 The sleep is definately an issue with CPU usage, but not the issue your having with your pictures, take a look at my edit above, and use the disable method for your pictures. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Pakku Posted May 2, 2006 Author Share Posted May 2, 2006 Thanks all, it works fine now Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me 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