foolove Posted October 5, 2011 Share Posted October 5, 2011 On the compiler it compiles iwth an icon so when i right click properites it will show my icon and in systray it will show the icon just not on my desktop maybe i need to restart my computer not sure Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove,Did you try searching for "icon" in the Help file? I think not or you might have found GUISetIcon. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 Using this when i compile it will have an icon if i add that code and delete the icon off my system? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove, Have you tried? No. For that you need to use #AutoIt3Wrapper_Icon=icon_path And you need the full SciTE4AutoIt3 package. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 I add #AutoIt3Wrapper_Icon=C:\path\to\icon to the top of my script set the path in the aut2exe and nothing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove,Do you have the full SciTE4AutoIt3 package? If you do and still nothing than please post the code you are using. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 (edited) expandcollapse popup#cs ---------------------------------------------------------------------------- Author: Aaron Purpose: The purpose of this script is to basically do autoconnections for OpenVPN on Windows #ce ---------------------------------------------------------------------------- #AutoIt3Wrapper_Icon=C:\Users\Aaron\Desktop\favicon.ico #include <WindowsConstants.au3> #include <GUIToolbar.au3> #include <WinAPI.au3> #Include <GuiMenu.au3> ;This code launches the application as administrator as needed with OpenVPN #RequireAdmin ;... RunWait("powercfg -SETDCVALUEINDEX SCHEME_BALANCED SUB_NONE CONSOLELOCK 0", "", @SW_HIDE) Run("C:\Program Files\OpenVPN\bin\openvpn-gui.exe") sleep(2000) ;This is the awesome code I got from the forum in order to process and find programs in systray and right click on them Opt("WinTitleMatchMode", 2) Global $hSysTray_Handle, $iSystray_ButtonNumber Global $sToolTipTitle = "OpenVPN GUI" ; Add the text of your tray icon here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $iSystray_ButtonNumber = Get_Systray_Index($sToolTipTitle) If $iSystray_ButtonNumber = 0 Then MsgBox(16, "Error", "Is the App running?") Exit Else Sleep(250) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") Sleep(250) Send("{UP}") ; Move your cursor around on the menu here <<<<<<<<<<<<<<<<<<<<<<<<<<< ConsoleWrite(GetPopUpSelText() & @CRLF) ; This will read the currently selected item <<<<<<<<<<<<<<<<<<<<<<<<<<<< EndIf Func Get_Systray_Index($sToolTipTitle) ; Find systray handle $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "System tray not found") Exit EndIf ; Get systray item count Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) If $iSystray_ButCount = 0 Then MsgBox(16, "Error", "No items found in system tray") Exit EndIf ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) <> 0 Then ExitLoop Next If $iSystray_ButtonNumber = $iSystray_ButCount Then Return 0 ; Not found Else Return $iSystray_ButtonNumber ; Found EndIf EndFunc Func GetPopUpSelText() Local $aPopUp_List = _WinAPI_EnumWindowsPopup() Local $hWnd = $aPopUp_List[1][0] Local $sClass = $aPopUp_List[1][1] If $sClass = "#32768" Then ; This is a "standard" Windows API popup menu $hMenu = _SendMessage($hWnd, $MN_GETHMENU, 0, 0) If _GUICtrlMenu_IsMenu($hMenu) Then $iCount = _GUICtrlMenu_GetItemCount($hMenu) For $j = 0 To $iCount - 1 If _GUICtrlMenu_GetItemHighlighted($hMenu, $j) Then Return _GUICtrlMenu_GetItemText($hMenu, $j) EndIf Next EndIf EndIf Return "" EndFunc ;This code clicks the connect button and does the login MouseClick ("Left", 880,578) MouseClick ("Left", 625,365) send("user") MouseClick ("Left", 663,388) send("pass") send("{ENTER}") Edited October 5, 2011 by foolove Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 Also in the above need to click the ok button for when i prompts me for confirmation to run as admin i try mouse click and have little luck Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove,And you are compiling this using F7/Ctrl-F7 or the "Build/Compile" menu from within SciTE4AutoIt3 ? You need AutoIt3Wrapper for this directive to be honoured. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove,Also in the above need to click the ok button for when i prompts me for confirmation to run as admin i try mouse click and have little luckIf UAC could be bypassed by AutoIt it would be a pretty useless scurity measure! You cannot automate the Security dialogs - you must click them manually. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 Man thanks for the insight on all this I did try f7 with as recommending still my exe does not display the ico file i added the suggested line at the top of my script as above before i was using aut2exe utility Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 5, 2011 Moderators Share Posted October 5, 2011 foolove, I am confused - do you now have the icon in your GUI or not? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 melba23 this is not a gui app like it doesnt have a graphic user interface the script just does mouse clicks with no frontend the icon part of it is just aesthetics obviously but would be nice to know how to do properly thanks in advance and thanks for your help thus far Link to comment Share on other sites More sharing options...
Developers Jos Posted October 5, 2011 Developers Share Posted October 5, 2011 Show the SciTE Outputpane information when you do the F7 so we can see/understand what you are doing. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
foolove Posted October 5, 2011 Author Share Posted October 5, 2011 >"C:\Program Files\AutoIt3\SciTE\..\aut2exe\aut2exe.exe" /in "C:\Users\Aaron\Desktop\openVPN.au3" Ultimate Packer for eXecutables Copyright © 1996 - 2008 UPX 3.03w Markus Oberhumer, Laszlo Molnar & John Reiser Apr 27th 2008 File size Ratio Format Name -------------------- ------ ----------- ----------- 646144 -> 300544 46.51% win32/pe openVPN.exe Packed 1 file. >Exit code: 0 Time: 2.530 Link to comment Share on other sites More sharing options...
Developers Jos Posted October 5, 2011 Developers Share Posted October 5, 2011 Ok, as stated: Load the full SciTE4AutoIt3 packages with the separate installer first and then try it again. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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