realkiller Posted November 15, 2006 Posted November 15, 2006 how can i add a green/red circel in a gui like . that if a window is open it must turn green and if it is closed it must turn red. i wanna place it beaneath every buntonexpandcollapse popup#include <GUIConstants.au3> #include <Date.au3> #include <IE.au3> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Passwords >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $Password = "password.txt" $loginClairAV_U = FileReadLine($Password, 21) $loginClairAV_P = FileReadLine($Password, 22) $ClairifyU = FileReadLine($Password, 13) $ClairifyP = FileReadLine($Password, 14) $RollercoasterU = FileReadLine($Password, 6) $RollercoasterP = FileReadLine($Password, 7) $supportcenterU = FileReadLine($Password, 2) $supportcenterP = FileReadLine($Password, 3) $AvayaU = FileReadLine($Password, 17) $AvayaP = FileReadLine($Password, 18) $LotusP = FileReadLine($Password, 10) $isisU = FileReadLine($Password, 29) $isisP = FileReadLine($Password, 30) Local $Password = "timmy" ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Passwords >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Do $sPass = InputBox("Security Check", "Enter your password:", "", "*") If $sPass = $Password Then MsgBox(0, "Access Granted", "Thank you, you have logged in successfully.", 1) Else MsgBox(0, "Access Denied", "Sorry, you did not enter the correct password." & @CRLF & "Try Again.") EndIf Until $sPass = $Password ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> GUICreate("24 Help V1.0 Beta 1", "878", "24", "", "", $WS_POPUPWINDOW, $WS_EX_TOPMOST) Opt("GUICoordMode", 2) GUISetHelp("notepad");<--- will run notepad if F1 is typed $Button_7 = GUICtrlCreateButton("< ISIS >", 2, 2, 90) $Button_2 = GUICtrlCreateButton("< Rollercoaster >", 0, -1) $Button_3 = GUICtrlCreateButton("< Support Center >", 0, -1, 93) $Button_4 = GUICtrlCreateButton("< C-Spire >", 0, -1) GUICtrlCreateDate(@YEAR & "/" & @MON & "/" & @MDAY, 7, -1, 185) $Button_5 = GUICtrlCreateButton("< Avaya >", 50, -1, 90) $Button_1 = GUICtrlCreateButton("< Clairify >", 0, -1) $Button_6 = GUICtrlCreateButton("< Lotus >", 0, -1) Opt("GUICoordMode", 1) $lblTime = GUICtrlCreateLabel("Time", 562, 5, 43) $lastsec = @SEC GUISetState() While 1 $msg = GUIGetMsg() updateTime() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1; Clairify( moet gecontroleerd nog worden/ de moet nog een winactivate hebben voor als hij al bestaat.) O Fout ;opent de login voor na clairify toe te gaan _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx") ;wacht tot hij klaar is met het laden van de pagina $x = StatusbarGetText("UPC Web Access Login") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access Login") WEnd ;verplaatst het scherm zodat alles netjes staat WinMove("UPC Web Access Login", "", 0, 26, 1024) ;login Send($loginClairAV_U) Send("{TAB}") Send($loginClairAV_P) Send("{TAB}") Send("{DOWN}") Send("{TAB 2}") Send("{ENTER}") ;wacht tot hij klaar is met inloggen $x = StatusbarGetText("UPC Web Access - Welcome") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access - Welcome") WEnd ;clairify gaat hij nu opstarten _IENavigate($oIE, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF102.Clarify+249+CLARNL+3T+Twenty4Help&NFuse_AppFriendlyNameURLENcoded=Clarify+249+CLARNL+3T+Twenty4Help") ;rot venster dat nog komt WinWaitActive("Code of conduct,E-Mail usage and Internet policy.") Send("{ENTER}") ;login clairify WinWaitActive("Clarify Login") Send($ClairifyP) Send("{TAB 4}") Send($ClairifyU) Send("{ENTER}") ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Clairify Einde >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Rollercoaster Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_2; Rollercoaster (controleren of er nu daadwerkelijk een wachtwoord is of niet) O Fout If WinExists("Rollercoaster") Then WinActivate("Rollercoaster") WinMove("Rollercoaster", "", 0, 26, 1024) Else _IECreate("http://sddportal.yi.org/tools/rollercoaster/main.html") WinWaitActive("Connect to sddportal.yi.org") WinMove("Connect to sddportal.yi.org", "", "", "", 999999999999999999, 99999999999999999) ControlSend("Connect to sddportal.yi.org", "", "Edit2", $RollercoasterU) ControlSend("Connect to sddportal.yi.org", "", "Edit3", $RollercoasterP) Send("{ENTER}") WinWaitActive("Rollercoaster") WinMove("Rollercoaster", "", 0, 26, 1024) EndIf ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Rollercoaster Einde >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Support Center Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_3; SupportSoft Support Center Web V Goed AutoItSetOption("WinTitleMatchMode", 1) If WinExists("SupportSoft Support Center Web") Then WinMove("SupportSoft Support Center Web", "", 0, 26, 1024) WinActivate("SupportSoft Support Center Web") Else AutoItSetOption("WinTitleMatchMode", 1) _IECreate("http://scaprd.upc.biz/sdchealtop") WinWaitActive("Support Center login") WinMove("Support Center login", "", "", 999999999999999999, 99999999999999999) $x = StatusbarGetText("Support Center login") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("Support Center login") WEnd Send($supportcenterU) Send("{TAB}") Send($supportcenterP) Send("{ENTER}") WinWaitActive("SupportSoft Support Center Web") WinMove("SupportSoft Support Center Web", "", 0, 26, 1024) EndIf ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Support Center Einde >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C-spire Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_4; C-Spire (Login nog maken voor C-spire en window activate) O Fout $oIE = _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx") $x = StatusbarGetText("UPC Web Access Login") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access Login") WEnd WinMove("UPC Web Access Login", "", 0, 26, 1024) Send($loginClairAV_U) Send("{TAB}") Send($loginClairAV_P) Send("{TAB}") Send("{DOWN}") Send("{TAB 2}") Send("{ENTER}") Sleep("1000") $x = StatusbarGetText("UPC Web Access - Welcome") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access - Welcome") WEnd _IENavigate($oIE, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF103.Internet+Explorer&NFuse_AppFriendlyNameURLENcoded=Internet+Explorer") ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C-spire Einde >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Avaya Begin >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_5; Avaya V Goed $oIE = _IECreate("https://iapp.upc.biz/Citrix/UPCApplications/auth/login.aspx") $x = StatusbarGetText("UPC Web Access Login") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access Login") WEnd Send($loginClairAV_U) Send("{TAB}") Send($loginClairAV_P) Send("{TAB}") Send("{DOWN}") Send("{TAB 2}") Send("{ENTER}") Sleep("1000") $x = StatusbarGetText("UPC Web Access - Welcome") While Not StringInStr($x, "Done") Sleep(100) $x = StatusbarGetText("UPC Web Access - Welcome") WEnd _IENavigate($oIE, "https://iapp.upc.biz/Citrix/UPCApplications/site/launch.ica?NFuse_Application=Citrix.MPS.App.NLCF102.Avaya+613&NFuse_AppFriendlyNameURLENcoded=Avaya+613") WinWaitActive("Code of conduct,E-Mail usage and Internet policy. - \\Remote") Send("{ENTER}") WinWaitActive("Avaya Agent Login") Send($AvayaU) Send("{TAB}") Send($AvayaP) Send("{ENTER}") ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Avaya Einde >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Lotus Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_6; Lotus V Goed AutoItSetOption("WinTitleMatchMode", 1) If WinExists("Logout Screen") Then WinActivate("Logout Screen") WinWaitActive("Logout Screen") Send("{ENTER}") Send($LotusP) Sleep("500") Send("{ENTER}") AutoItSetOption("WinTitleMatchMode", 2) WinWaitActive("IBM Lotus Notes") WinMove("IBM Lotus Notes", "", 0, 26, 1024) EndIf If ProcessExists("nlnotes.exe") Then AutoItSetOption("WinTitleMatchMode", 2) WinActivate("IBM Lotus Notes") WinMove("IBM Lotus Notes", "", 0, 26, 1024) Else AutoItSetOption("WinTitleMatchMode", 1) Run("C:\lotus\notes\notes.exe =N:\notes.ini") WinWaitActive("Lotus Notes") Sleep("1000") WinActivate("Lotus Notes") Send($LotusP) Sleep("500") Send("{ENTER}") AutoItSetOption("WinTitleMatchMode", 2) WinWaitActive("IBM Lotus Notes") WinMove("IBM Lotus Notes", "", 0, 26, 1024) EndIf ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Lotus Start >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Case $msg = $Button_7; ISIS V Goed AutoItSetOption("WinTitleMatchMode", 1) If WinExists("ISIS") Then WinActivate("ISIS") Else _IECreate("http://isis.yi.org/") WinWaitActive("Connect to isis.yi.org") WinMove("Connect to isis.yi.org", "", "", "", 999999999999999999, 99999999999999999) ControlSend("", "", "Edit2", $isisU) ControlSend("", "", "Edit3", $isisP) ControlClick("", "", "Button2") WinWaitActive("ISIS") WinMove("ISIS", "", 0, 26, 1024) EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EndSelect WEnd Func updateTime() $cursec = @SEC If $cursec <> $lastsec Then $lastsec = $cursec GUICtrlSetData($lblTime, _NowTime()) EndIf EndFunc Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
PaulIA Posted November 15, 2006 Posted November 15, 2006 GUICtrlCreatePic Auto3Lib: A library of over 1200 functions for AutoIt
BigDod Posted November 15, 2006 Posted November 15, 2006 Lookup GUICtrlCreateGraphic and GUICtrlSetGraphic in the help file. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
realkiller Posted November 15, 2006 Author Posted November 15, 2006 can somone plese make a example of one i just tryed but can figure it out Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
PaulIA Posted November 15, 2006 Posted November 15, 2006 can somone plese make a example of one i just tryed but can figure it outStraight from the help file: ;----- example 1 ---- #include <GUIConstants.au3> GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend GUISetState () ; resize the control $n=GUICtrlSetPos($n,50,50,200,100) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Auto3Lib: A library of over 1200 functions for AutoIt
realkiller Posted November 15, 2006 Author Posted November 15, 2006 yeah i saw that but i cant impost it intow the gui from me iam not so famillure with gui Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
PaulIA Posted November 15, 2006 Posted November 15, 2006 yeah i saw that but i cant impost it intow the gui from me iam not so famillure with guiWhat? Auto3Lib: A library of over 1200 functions for AutoIt
realkiller Posted November 15, 2006 Author Posted November 15, 2006 (edited) iam not that good with gui i tryed to get it but i cat figurer it out, the only thing i wanna have i that onder one bunton when a window is active that it turns green and if the window isnt active it should turn red. everything else i can do myself but i need your help guys plz help me Edited November 15, 2006 by realkiller Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
PaulIA Posted November 15, 2006 Posted November 15, 2006 iam not that good with gui i tryed to get it but i cat figurer it outGo back to my first post and look in the help file for GUICtrlCreatePic. If you can create a button in a GUI, you can create a picture. It's the same calling syntax other than specifying a path to the graphic that you want to display. Create a red and green graphic (in MSPaint or some other graphic program) to be displayed and then use GUICtrlCreatePic to display the one that you want at the coordinates that you want. It's not that complicated. Auto3Lib: A library of over 1200 functions for AutoIt
realkiller Posted November 15, 2006 Author Posted November 15, 2006 (edited) GUICreate("24 Help V1.0 Beta 1", "878", "24", "", "", $WS_POPUPWINDOW, $WS_EX_TOPMOST) Opt("GUICoordMode", 2) GUISetHelp("notepad") ;<--- will run notepad if F1 is typed $Button_7 = GUICtrlCreateButton("< ISIS >", 0, 2, 90) $Button_2 = GUICtrlCreateButton("< Rollercoaster >", 0, -1) $Button_3 = GUICtrlCreateButton("< Support Center >", 0, -1, 93) $Button_4 = GUICtrlCreateButton("< C-Spire >", 0, -1) GUICtrlCreateDate(@YEAR & "/" & @MON & "/" & @MDAY, 7, -1, 185) $Button_5 = GUICtrlCreateButton("< Avaya >", 50, -1, 90) $Button_1 = GUICtrlCreateButton("< Clairify >", 0, -1) $Button_6 = GUICtrlCreateButton("< Lotus >", 0, -1) GUICtrlCreatePic ( "c:\groen.gif", -1, -1) i got it now like this but i cant get it beneath a bunton Edited November 15, 2006 by realkiller Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
Fossil Rock Posted November 15, 2006 Posted November 15, 2006 Put the attached grapics in your script directory or edit as needed. expandcollapse popup#include <GUIConstants.au3> Opt("WinTitleMatchMode", 2) $Form1 = GUICreate("AForm1", 522, 360, 193, 115) $Notepad = GUICtrlCreateButton("Notepad", 40, 144, 75, 25, 0) $Calc = GUICtrlCreateButton("Calc", 160, 144, 75, 25, 0) $Freecell = GUICtrlCreateButton("Freecell", 280, 144, 75, 25, 0) $ClickMe = GUICtrlCreateButton("MSPaint", 400, 144, 75, 25, 0) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\small_button_red.bmp", 32, 176, 100, 97) $Pic2 = GUICtrlCreatePic(@ScriptDir & "\small_button_red.bmp", 152, 176, 100, 97) $Pic3 = GUICtrlCreatePic(@ScriptDir & "\small_button_red.bmp", 272, 176, 100, 97) $Pic4 = GUICtrlCreatePic(@ScriptDir & "\small_button_red.bmp", 392, 176, 100, 97) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Notepad Run("Notepad.exe") GUICtrlSetImage($Pic1,@ScriptDir & "\small_button_green.bmp") Case $Calc Run("Calc.exe") GUICtrlSetImage($Pic2,@ScriptDir & "\small_button_green.bmp") Case $Freecell Run("Freecell.exe") GUICtrlSetImage($Pic3,@ScriptDir & "\small_button_green.bmp") Case $ClickMe Run("MSPaint.exe") GUICtrlSetImage($Pic4,@ScriptDir & "\small_button_green.bmp") EndSwitch If Not ProcessExists("Notepad.exe") Then GUICtrlSetImage($Pic1,@ScriptDir & "\small_button_red.bmp") If Not ProcessExists("Calc.exe") Then GUICtrlSetImage($Pic2,@ScriptDir & "\small_button_red.bmp") If Not ProcessExists("Freecell.exe") Then GUICtrlSetImage($Pic3,@ScriptDir & "\small_button_red.bmp") If Not ProcessExists("MSPaint.exe") Then GUICtrlSetImage($Pic4,@ScriptDir & "\small_button_red.bmp") WEndsmall_button_red.bmpsmall_button_green.bmp Agreement is not necessary - thinking for one's self is!
realkiller Posted November 15, 2006 Author Posted November 15, 2006 thx verrrrrry mutch you helped me Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2
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