Hello Me You Posted March 2, 2007 Posted March 2, 2007 Is it possible to create a tray item that allows you to edit the script? Random
lod3n Posted March 2, 2007 Posted March 2, 2007 What a useful idea. Here you go. Note that this will not work on compiled scripts, for obvious reasons. #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $edititem = TrayCreateItem("Edit Script") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $edititem _EditSelf() EndSelect WEnd Exit func _EditSelf() local $objShell = ObjCreate("Shell.Application") local $objFolder = $objShell.Namespace(@ScriptDir) local $objFolderItem = $objFolder.ParseName(@ScriptName) $objFolderItem.InvokeVerb("Edit") Exit EndFunc [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
Hello Me You Posted March 2, 2007 Author Posted March 2, 2007 Thanks man, works great but when I click edit script (after the editor opens and shows the script) the script exit. Random
Helge Posted March 2, 2007 Posted March 2, 2007 Thanks man, works great but when I click edit script (after the editor opens and shows the script) the script exit.You don't think that has something to do with the Exit in the end of _EditSelf ? Anyway, isn't that _EditSelf the same as... this ? ShellExecute(@ScriptFullPath, "edit")
Hello Me You Posted March 2, 2007 Author Posted March 2, 2007 Oops sorry, I didn't see the Exit at the end Random
lod3n Posted March 2, 2007 Posted March 2, 2007 AutoIt's ShellExecute and I have a bad relationship. We aren't speaking to each other. Try this: ShellExecute(@ScriptFullPath, "properties") sleep(2000)oÝ÷ Ø]¡ë'ßÛp¢¹éí¯(¾&çZ®K"uæ®¶sbb33c¶ö&¥6VÆÂÒö&¤7&VFRgV÷Cµ6VÆÂäÆ6FöâgV÷C²¢b33c¶ö&¤föÆFW"Òb33c¶ö&¥6VÆÂäæÖW76R67&DF"¢b33c¶ö&¤föÆFW$FVÒÒb33c¶ö&¤föÆFW"å'6TæÖR67&DæÖR¢b33c¶ö&¤föÆFW$FVÒäçfö¶UfW&"gV÷C·&÷W'FW2gV÷C²§6ÆVW#oÝ÷ Ù'1¬xýë"º'»"zÈr©j·¶¬x,h¥j·îËb¢v¥Ü¢éÝvéeeÆèn7´èZܨ¹Æ§+-¢ëmæ¯j)ZnW¯z¶ì¶¯+ajÜ"¶¡zYDÅç.µæ®¶sbb33c¶6öÅfW&'2Òb33c¶ö&¤föÆFW$FVÒåfW&'0¤f÷"b33c¶ö&¥fW&"âb33c¶6öÅfW&'0¢6öç6öÆUw&FRb33c¶ö&¥fW&"ääÔRfײ5$Äb¤æW [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
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