Cha0sBG Posted August 24, 2008 Share Posted August 24, 2008 title says it all Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Uten Posted August 24, 2008 Share Posted August 24, 2008 Just listen hard, simple as that. This answer says it all Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 don't know what u just tryed to explain but ... Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 24, 2008 Moderators Share Posted August 24, 2008 The same way you know if any control is clicked. You give the control a variable name, then check the GUIGetMsg() variable to see if it's been clicked: $i_pic = GUICtrlCreatePic() Switch GUIGetMsg() Case $i_pic etc... 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...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 (edited) you mean something like this ? #include <GUiconstantsex.au3> #include <GUiconstantsex.au3> #include <Windowsconstants.au3> $GUI = GUICreate("Win Get Title", 301, 300, -1, -1, BitOR($WS_POPUP, $WS_BORDER)) $PIC = GUICtrlCreatePic("Header.jpg", 0, 0, 301, 20, -1, $GUI_WS_EX_PARENTDRAG) $Close = GUICtrlCreateLabel("X", 288, 2, 12, 18, -1,$GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $min = GUICtrlCreateLabel("_", 275, 0, 12, 18, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) while 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $min GUISetState (@SW_MINIMIZE) Case $Close Exit EndSwitch WEnd but kinda with a label and it dousnt respond in the start i got an idea how to do it but now i totaly messed it up Edited August 24, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 24, 2008 Moderators Share Posted August 24, 2008 (edited) You have to disable the Pic first:#include <GUiconstantsex.au3> #include <GUiconstantsex.au3> #include <Windowsconstants.au3> $GUI = GUICreate("Win Get Title", 301, 300, -1, -1, BitOR($WS_POPUP, $WS_BORDER)) $PIC = GUICtrlCreatePic("Header.jpg", 0, 0, 301, 20, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetState($PIC, $GUI_DISABLE) $Close = GUICtrlCreateLabel("X", 288, 2, 12, 20) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $min = GUICtrlCreateLabel("_", 275, 0, 12, 20) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) while 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $min GUISetState(@SW_MINIMIZE, $GUI) Case $Close Exit EndSwitch WEnd Edited August 24, 2008 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...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 but then i whount be able to move the gui (((( Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Tomb Posted August 24, 2008 Share Posted August 24, 2008 (edited) you can also opt GuiOnEventMode, and just set an event on the control. for example. Opt("GUIOnEventMode", 1) GuiCreate("click the pic", 400, 400, -1, -1) GuiCtrlCreatePic("1.jpg", 0, 0, 10, 10) GuiCtrlSetOnEvent(-1, "clickedpic") While 1 sleep(10) WEnd Func ClickedPic() MsgBox(0, "", "has been clicked") exit EndFunc Edited August 24, 2008 by Tomb616 Link to comment Share on other sites More sharing options...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 tomb616 your example isn't working ....gives error Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Tomb Posted August 24, 2008 Share Posted August 24, 2008 tomb616 your example isn't working ....gives error well ofcourse it doesnt. its not the full code. also needs this at the top. #Include <GuiConstants.au3> #Include <WindowsConstants.au3> Link to comment Share on other sites More sharing options...
Uten Posted August 24, 2008 Share Posted August 24, 2008 If GUICtrlCreatePic can't locate "Header.jpg" your in trouble. Check the returned value. #include <GUiconstantsex.au3> #include <GUiconstantsex.au3> #include <Windowsconstants.au3> $GUI = GUICreate("Win Get Title", 301, 300, -1, -1, BitOR($WS_POPUP, $WS_BORDER)) $PIC = GUICtrlCreatePic("C:\Documents and Settings\Default User\My Documents\My Pictures\sample.jpg", 0, 0, 270, 20, -1, $GUI_WS_EX_PARENTDRAG) ConsoleWrite("$PIC:=" & $PIC & @CRLF) $Close = GUICtrlCreateLabel("X", 288, 2, 12, 18, -1,$GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $min = GUICtrlCreateLabel("_", 275, 0, 12, 18, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) while 1 Switch GUIGetMsg() case 0 Case $GUI_EVENT_CLOSE Exit Case $min GUISetState (@SW_MINIMIZE) Case $PIC MSGBOX(48, ("CLICK", "$PIC:=" & $PIC) Case $Close Exit EndSwitch WEnd Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 Ulten when i use your code everything works but .... the X and _ labels are not set to bkcolor transperant what can cause this ? Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Uten Posted August 24, 2008 Share Posted August 24, 2008 Probably because I messed with it to figure out what could be wrong. Compare the settings to your original. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Uten Posted August 24, 2008 Share Posted August 24, 2008 Try to add: GUISetBkColor( 0x333333, $GUI) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 the 2 labels are still not transperant and as u see i'v added the code so they can become transperant ;( Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 24, 2008 Moderators Share Posted August 24, 2008 (edited) Chasing your tail here. 1. You should be doing your homework dissecting xskin.au3 and seeing how to do these things. 2. Without disabling the pic you're pretty much SOL if you want to interact with the labels. 3. If you have to do this (only god knows why you are not using XSkin.au3 already done for you), then you'll have to look at GUIGetMsg() .. look at the parameter it takes, and mess with cursor position. <snipped> Edited August 24, 2008 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...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 here is all the code only thing i need now is to make the labels transperant and i have added the code for that . #include <GUIConstantsex.au3> #include <Windowsconstants.au3> $GUI = GUICreate("Win Get Title", 301, 300, -1, -1, BitOR($WS_POPUP, $WS_BORDER)) $PIC = GUICtrlCreatePic("Header.JPG", 0, 0, 270, 20, -1, $GUI_WS_EX_PARENTDRAG) $Close = GUICtrlCreateLabel("X", 288, 2, 12, 18, -1,$GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $min = GUICtrlCreateLabel("_", 275, 0, 12, 18, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) while 1 Switch GUIGetMsg() case 0 Case $GUI_EVENT_CLOSE Exit Case $min GUISetState (@SW_MINIMIZE) Case $PIC MSGBOX(0, "You Clicked The PiC", "CLICK ON PICK :D") Case $Close Exit EndSwitch WEnd Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 24, 2008 Moderators Share Posted August 24, 2008 here is all the code only thing i need now is to make the labels transperant and i have added the code for that . #include <GUIConstantsex.au3> #include <Windowsconstants.au3> $GUI = GUICreate("Win Get Title", 301, 300, -1, -1, BitOR($WS_POPUP, $WS_BORDER)) $PIC = GUICtrlCreatePic("Header.JPG", 0, 0, 270, 20, -1, $GUI_WS_EX_PARENTDRAG) $Close = GUICtrlCreateLabel("X", 288, 2, 12, 18, -1,$GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $min = GUICtrlCreateLabel("_", 275, 0, 12, 18, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetColor(-1,0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) while 1 Switch GUIGetMsg() case 0 Case $GUI_EVENT_CLOSE Exit Case $min GUISetState (@SW_MINIMIZE) Case $PIC MSGBOX(0, "You Clicked The PiC", "CLICK ON PICK :D") Case $Close Exit EndSwitch WEndGuess I'm failing to see the difference with this an the first code? 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...
Cha0sBG Posted August 24, 2008 Author Share Posted August 24, 2008 omg i'm sooooooo sry when Ulten edited the code i guess he changed the value of the pic's wight and set it to lower and it didn't cover the whole gui so there is no problem i will say again soooooooooo sry Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. 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