Creator Posted July 10, 2008 Share Posted July 10, 2008 (edited) I made a portable version of AutoIt3 (3.2.12.1).Just put the content of the zipfile in the root of your usb-drive. Its important that the directorystructure is maintained. I programmed it to be PortableApps(which i use) ready. You can get it at http://portableapps.orgAll that had to be done, was create a launcher which modifies au3.properties(scite) on run.And i modified autoit3wrapper.au3 and autoit3wrapper_gui.au3 to act portable.In my situation my launcher sits next to a directory(called App) which contains the full contents of the autoit3 installation folder.My launcher looks like this:#include <File.au3> #include <Array.au3> Dim $arProps _FileReadToArray(@ScriptDir & "\App\Scite\properties\au3.properties",$arProps) For $i=1 To $arProps[0] If StringUpper(StringLeft(StringStripWS($arProps[$i],1), 11)) = 'AUTOIT3DIR=' Then $arProps[$i] = 'autoit3dir=' & @ScriptDir & '\App' EndIf Next _FileWriteFromArray(@ScriptDir & "\App\Scite\properties\au3.properties",$arProps, 1) Run(@ScriptDir & "\App\Scite\Scite.exe", @ScriptDir & "\App\Scite")Of course its completely up to yourself how to modify au3.properties. This is just an example.I also included the graphical debugger from http://thefoolonthehill.net/AutoIt_AutoIt_Debugger.htm which is also portable. You do need .NET 2.0 framework on host pc though!You can debug(graphically) your active script by pressing ctrl+2 or look for "Graphical Debugger" in the scite tools menu.You can start scite from usbdrive:\PortableApps\AutoIt\Scite_Launcher.exe. If you have portableapps installed on your drive, there will be a menu-item called "AutoIt" in your portableappsmenu.You can change the directorystructure only when you adjust $Portable_AutoItDir in autoit3wrapper.au3 and autoit3wrapper_gui.au3 (in scitedir\AutoIt3Wrapper)and edit the AutoIt.au3 (tha launcher in usbdrive:\PortableApps\AutoIt). Grtz. muttley-edit- Autoit3wrapper_Gui doesnt display autoit version(always 0.0.0.0) when preparing compile in the unmodified script. It doesnt bother me, but when it does to you, you'll have to edit autoit3wrapper_gui.au3 and recompile.-edit2- When using the unmodified Autoit3wrapper_Gui(on stick) on a host pc where autoit is already installed, the wrapper will use the installed version for doing the compile. You can easely detect if you use your portable version on a host WITH autoit installed. The version number in AutoItWrapper_Gui will not be 0.0.0.0 but the version number of the installed autoit version on the host Edited July 12, 2008 by Creator Link to comment Share on other sites More sharing options...
martin Posted July 10, 2008 Share Posted July 10, 2008 I made a portable version of AutoIt3 (3.2.12.1).Just put the content of the zipfile in the root of your usb-drive. Its important that the directorystructure is maintained. I programmed it to be PortableApps(which i use) ready. You can get it at http://portableapps.orgAll that had to be done, was create a launcher which modifies au3.properties(scite) on run.And i modified autoit3wrapper.au3 and autoit3wrapper_gui.au3 to act portable.I also included the graphical debugger from http://thefoolonthehill.net/AutoIt_AutoIt_Debugger.htm which is also portable. You do need .NET 2.0 framework on host pc though!You can debug(graphically) your active script by pressing ctrl+2 or look for "Graphical Debugger" in the scite tools menu.You can start scite from usbdrive:\PortableApps\AutoIt\Scite_Launcher.exe. If you have portableapps installed on your drive, there will be a menu-item called "AutoIt" in your portableappsmenu.You can change the directorystructure only when you adjust $Portable_AutoItDir in autoit3wrapper.au3 and autoit3wrapper_gui.au3 (in scitedir\AutoIt3Wrapper) and edit the AutoIt.au3 (tha launcher in usbdrive:\PortableApps\AutoIt).Grtz. muttley Download PortableAutoIt3 Here!This is a great idea CreatoR. I'll try it out next week when I'll have more time.But one question, will it ruin existing settings on a PC if I use this portable version? I'm thinking that if the PC I run it on already has AutoIt installed, will registry settings get changed or have you avoided that? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Creator Posted July 10, 2008 Author Share Posted July 10, 2008 (edited) This is a great idea CreatoR. I'll try it out next week when I'll have more time.But one question, will it ruin existing settings on a PC if I use this portable version? I'm thinking that if the PC I run it on already has AutoIt installed, will registry settings get changed or have you avoided that?It leaves the host alone muttley You can't run it at the same time as your installed version though (i thought you could) due to scite restrictions of multiple instances.Grtz Edited July 10, 2008 by Creator Link to comment Share on other sites More sharing options...
gseller Posted July 11, 2008 Share Posted July 11, 2008 GROOVY Creator!! Will be nice to tag along on a flash stick... Thanks So Much! Link to comment Share on other sites More sharing options...
n0tb4d Posted July 11, 2008 Share Posted July 11, 2008 hmmm realy good idea... Link to comment Share on other sites More sharing options...
longtex Posted July 11, 2008 Share Posted July 11, 2008 I made a portable version of AutoIt3 (3.2.12.1).Fantabulous. PortableApps is a fooken great set of progs. Even for the non-hacker, having a pocket-portable drive with your internet apps (FoxFireFox and Thunderbird) and your office suite (Open Office) is incredibly handy. You can work on documents, interact on the web, check email... always with the same interface. I've been using two 4GB sticks - one for personal, one for work - with a pretty complete set of PA progs plus some that aren't "official" but do work (e.g. Total Commander - yes, I'm so fooken gray in the beard that I actually used Norton Commander on DOS). I made one for my favorite wife so she can carry data AND her apps wherever she goes. Took a while to wean her away from Micro$oft Office, but now she uses Open Office for her docs and sheets, 'cause OO will save as .doc and .xsl if needed. I actually put the "regular" AU3 on my sticks... and it seems to work fairly well so far, but I'll bet this "official" one is cleaner - I don't think I've used mine on a system that I didn't have a "real" AU3 on, so the "official" one will likely prove much better - particularly as I've been doing some stuff for people where it's inconvenient to install the full AU, and this should make that a LOT easier to deal with.Thanks! Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too? Link to comment Share on other sites More sharing options...
Creator Posted July 11, 2008 Author Share Posted July 11, 2008 Fantabulous. PortableApps is a fooken great set of progs. Even for the non-hacker, having a pocket-portable drive with your internet apps (FoxFireFox and Thunderbird) and your office suite (Open Office) is incredibly handy. You can work on documents, interact on the web, check email... always with the same interface. I've been using two 4GB sticks - one for personal, one for work - with a pretty complete set of PA progs plus some that aren't "official" but do work (e.g. Total Commander - yes, I'm so fooken gray in the beard that I actually used Norton Commander on DOS). I made one for my favorite wife so she can carry data AND her apps wherever she goes. Took a while to wean her away from Micro$oft Office, but now she uses Open Office for her docs and sheets, 'cause OO will save as .doc and .xsl if needed. I actually put the "regular" AU3 on my sticks... and it seems to work fairly well so far, but I'll bet this "official" one is cleaner - I don't think I've used mine on a system that I didn't have a "real" AU3 on, so the "official" one will likely prove much better - particularly as I've been doing some stuff for people where it's inconvenient to install the full AU, and this should make that a LOT easier to deal with.Thanks!Thanks muttley (to all) If you "just" copied your autoit3 installation folder to your portable drive, that will only work as long as autoit is installed on the host.There are settings in au3.properties which are pointing to a "fixed" path to the directory of autoit and scite (and thus to all of its tools)The launcher modifies that file to point to the autoit,- and scite directory on your portable drive b4 launching scite.And then there is the issue of how autoit3wrapper and autoit3wrapper_gui (for those who don't know. That are incredible tools made by Jos. It wraps a whole bunch of almost nescecary tools into scite and makes compiling(scriptchecking,scriptstripping,tidy.etc) more complete than you'll ever need) are programmed to work. They kinda suppose that autoit is installed. With some minor adjustments the registry dependence was vanished and all path's are pointing to the portable directories of autoit and scite.Grtz Link to comment Share on other sites More sharing options...
longtex Posted July 11, 2008 Share Posted July 11, 2008 There are settings in au3.properties which are pointing to a "fixed" path to the directory of autoit and scite (and thus to all of its tools)The launcher modifies that file to point to the autoit,- and scite directory on your portable drive b4 launching scite.I looked again - I actually have one computer that does NOT have AU3 on it, and in scrounging around I had found the file - I think it's just "au3.properties" - and edited it manually... and it worked fine... of course, the usb stick's drive letter varies from e: on some machines to l: on others, so it's a manual edit every time. I haven't paid a lot of attention to scite goodies, so I probably just didn't notice that side of it. Let me ask you another question: some of the PortableApps don't get updated as they probably should, and certainly not automagically. Since AU3 doesn't (does it?) update itself, what are your plans regarding updates?Thanks again. Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too? Link to comment Share on other sites More sharing options...
Nahuel Posted July 12, 2008 Share Posted July 12, 2008 (edited) This is excellent. I'm going to give it a try right now (although these public PC's have a .exe blocker...). Great idea.-edit-Works a dream. This will be very helpful for me. Thank you very much. Edited July 12, 2008 by Nahuel Link to comment Share on other sites More sharing options...
Marcuzzo18 Posted July 12, 2008 Share Posted July 12, 2008 (edited) Hi Creator,this is so simple yet genious.I used to edit the properties file manually each time I worked on a different machine...and thanks to your script this is no longer neededI slighty modified your script to match my needs. I removed the very last line of the scriptRun(@ScriptDir & "\App\Scite\Scite.exe", @ScriptDir & "\App\Scite")oÝ÷ ÚØ^ÈZ)àjëh×6$DRIVE_NEW = StringLeft(@ScriptDir, 1) $FILE = FileOpen(@ScriptDir & "\App\Scite\properties\au3.properties", 0)oÝ÷ ÚÚºÚ"µÍÌÍÑUWÓUÈHÝ[ÓY ØÜJBÌÍÔÐÒUQH ÌÍÑUWÓUÈ [È ][ÝÎÌLÐÉÌLÙ][ÜY[ ÌLÔØÚUI][ÝÂÌÍÑSHH[SÜ[ ÌÍÔÐÒUQ [È ][ÝÉÌLÜÜYÉÌLØ]LËÜYÉ][ÝËwill allow you put the script and the scite folder anywhere you like.I have this script in a folder named "management" which is located in the [ROOT] of the usb keyand my SciTE folder is located in [ROOT]\Apps\development\SciTEthen using PSTART to launch apps from the key will allow you to execute your script at start up.then when I start Scite... the property file has already been modified with the correct detailsbedankt Kerel muttley Edited July 12, 2008 by Marcuzzo18 [font="Century Gothic"]quisnam est quantum stultus , balatro vel balatro quisnam insistovolubilis in solum rideo risi risum----------------------------------------------------------------------------------------------------------------------------Portable Command Line Tool[/font] Link to comment Share on other sites More sharing options...
Creator Posted July 12, 2008 Author Share Posted July 12, 2008 I looked again - I actually have one computer that does NOT have AU3 on it, and in scrounging around I had found the file - I think it's just "au3.properties" - and edited it manually... and it worked fine... of course, the usb stick's drive letter varies from e: on some machines to l: on others, so it's a manual edit every time. I haven't paid a lot of attention to scite goodies, so I probably just didn't notice that side of it. Let me ask you another question: some of the PortableApps don't get updated as they probably should, and certainly not automagically. Since AU3 doesn't (does it?) update itself, what are your plans regarding updates?Thanks again.Noooooooooooooooo .... what are you doing? I spent quit some time studying the wrappers from Jos (after just changing au3.properties and getting errors from aut2exe) and when its true what you say, going over 2 times 1400+ lines of code was completely unnescesary muttley Then Jos must have thought of autoit NOT being installed and i must have missed it.I will do some testing now with just editing au3.properties. If it seems that au3.properties is the only thingy that needs adjusting, that means that autoit (and tha wrappers from Jos) are already completely portable. The only thing you will then need is a launcher that modifies au3.properties for proper filepath's.And in that context regarding your question of updating: When a new autoit version comes out, you just copy the content of the autoitdir of the new version to your portable autoit location and modify au3.properties to adjust to proper portable path and then you use the launcher you where always using to launch autoit portable.But above is only the way if the wrappers really r portable. Im gonna start testing right away.Thanx for the feedback dude!Grtx Link to comment Share on other sites More sharing options...
Creator Posted July 12, 2008 Author Share Posted July 12, 2008 Hi Creator, this is so simple yet genious. I used to edit the properties file manually each time I worked on a different machine... and thanks to your script this is no longer needed I slighty modified your script to match my needs. I removed the very last line of the script Run(@ScriptDir & "\App\Scite\Scite.exe", @ScriptDir & "\App\Scite")oÝ÷ ÚØ^ÈZ)àjëh×6$DRIVE_NEW = StringLeft(@ScriptDir, 1) $FILE = FileOpen(@ScriptDir & "\App\Scite\properties\au3.properties", 0)oÝ÷ ÚÚºÚ"µÍÌÍÑUWÓUÈHÝ[ÓY ØÜJBÌÍÔÐÒUQH ÌÍÑUWÓUÈ [È ][ÝÎÌLÐÉÌLÙ][ÜY[ ÌLÔØÚUI][ÝÂÌÍÑSHH[SÜ[ ÌÍÔÐÒUQ [È ][ÝÉÌLÜÜYÉÌLØ]LËÜYÉ][ÝË will allow you put the script and the scite folder anywhere you like. I have this script in a folder named "management" which is located in the [ROOT] of the usb key and my SciTE folder is located in [ROOT]\Apps\development\SciTE then using PSTART to launch apps from the key will allow you to execute your script at start up. then when I start Scite... the property file has already been modified with the correct details bedankt Kerel As i said, it was made for portable apps But its really just about the concept. au3.properties must be adjusted to point to portable path's. How one does that is not the important part. Manually, launcher pstart , launcher portableapps ... the world to choose Im hoping it proves that the wrappers r portable too. It that case this is the simpelest concept for a cool solution i ever thought of muttley Geen probleem Kerel Link to comment Share on other sites More sharing options...
Creator Posted July 12, 2008 Author Share Posted July 12, 2008 (edited) Ok here's my testroute:Copied c:\Program Files\Autoit3 to c:\AutoIt3Uninstalled Scite4AutoitUninstalled AutoIt3Checked existence of c:\Program Files\AutoIt3 -> Existed and not empty -> deleted c:\Program Files\AutoIt3 manuallyChecked registry CurrentUser\Software\Autoit3 -> none existantChecked registry LocalMachine\Software\Autoit3 -> none existantChecked registry CurrentUser\Software\Autoit3 -> none existantChecked registry LocalMachine\Software\Microsoft\Windows\CurrentVersion\App Paths\Scite.exe -> none existantChecked registry LocalMachine\Software\Microsoft\Windows\CurrentVersion\App Paths\Au3Info.exe -> removed manuallyChecked registry LocalMachine\Software\Microsoft\Windows\CurrentVersion\App Paths\Aut2Exe.exe -> removed manuallyChecked registry LocalMachine\Software\Microsoft\Windows\CurrentVersion\App Paths\AutoIt3.exe -> removed manuallyModified the launcher for use with c:\AutoIt3 and copy to c:\Started launcher and tested : compile via wrappers(and all its tools), koda, sciteconfig,au3info,codewizzard, functionpopup, snippetholder, intellisenseAnd yep i wasted a bunch time by making a stupid mistake in adjusting au3.properties for the first time (must have been typo muttley ) because there is absolutely no aut2exe error this time.So guys... this is actually fantastic, because au3.properties is the only thingy that needs adjusting for scite and autoit to be portable.I will edit main topic.Grtz.-edit- Autoit3wrapper_Gui doesnt display autoit version(always 0.0.0.0) when preparing compile in the unmodified script. It doesnt bother me, but when it does to you, you'll have to edit autoit3wrapper_gui.au3 and recompile.-edit2- When using the unmodified Autoit3wrapper_Gui(on stick) on a host pc where autoit is already installed, the wrapper will use the installed version for doing the compile. You can easely detect if you use your portable version on a host WITH autoit installed. The version number in AutoItWrapper_Gui will not be 0.0.0.0 but the version number of the installed autoit version on the host Edited July 12, 2008 by Creator Link to comment Share on other sites More sharing options...
Developers Jos Posted July 12, 2008 Developers Share Posted July 12, 2008 (edited) Try the latest beta version of AutoIt3Wrapper & GUI because I think this (the version issue) was a reported bug that was fixed in there.http://www.autoitscript.com/autoit3/scite/..._SciTE4AutoIt3/Jos Edited July 12, 2008 by 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...
wraithdu Posted July 12, 2008 Share Posted July 12, 2008 I worked with Jos on a few path portability tweaks for the wrappers, which is why they work now. I've got the same setup on my portable drive, just never made any official launchers to do it. I haven't looked at your script, but I'm assuming you set the SciTE_HOME environment variable to portabalize SciTE? Link to comment Share on other sites More sharing options...
Creator Posted July 12, 2008 Author Share Posted July 12, 2008 Try the latest beta version of AutoIt3Wrapper & GUI because I think this (the version issue) was a reported bug that was fixed in there.http://www.autoitscript.com/autoit3/scite/..._SciTE4AutoIt3/JosThats briliant! Once again thanks for making scite such a fully loaded extreme power development environment. And sorry for making it look like AutoIt3Wrapper is anything besides absolutely perfect Grtz. ps: There still will be the issue with hosts that have autoit installed, but at least the wrapper will show the version with which the binary will be compiled muttley Link to comment Share on other sites More sharing options...
Developers Jos Posted July 12, 2008 Developers Share Posted July 12, 2008 Thats briliant! Once again thanks for making scite such a fully loaded extreme power development environment. And sorry for making it look like AutoIt3Wrapper is anything besides absolutely perfect Grtz. ps: There still will be the issue with hosts that have autoit installed, but at least the wrapper will show the version with which the binary will be compiled muttleyThe AutoIt3Wrapper is reasonable stable but isn't perfect. There is soo much happening in its bound to have issues. I have posted a script a years or 2 ago that will modify your registry to allow autoit/scite to be ran from any USB drive and will remove/change back the registry to its original settings when you stop running it. 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...
wraithdu Posted July 12, 2008 Share Posted July 12, 2008 Here's a few tweaks for AutoIt3Wrapper_Gui to finish off the portability (still not implemented in any official or beta release). You'll also have to adjust the includes for the new versions of AutoIt to compile it. Just find the sections and adjust to match what I have (it's all near the top of the script). #include <Date.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <ComboConstants.au3> #include <GuiTab.au3> #include <File.au3> ............... --> Remove Opt("RunErrorsFatal", 0) ............... ~ line 255 If $INP_AutoitDir = "" Then $INP_AutoitDir = StringLeft(@ScriptDir, StringInStr(@ScriptDir, "\Scite") - 1) $CurrentAutoIt_InstallDir = $INP_AutoitDir $CurrentAutoIt_InstallDirBeta = $INP_AutoitDir & "\Beta" Select Case FileExists(@ProgramFilesDir & "\AutoIt3\Au3Check.exe") $INP_AutoitDir = @ProgramFilesDir & "\AutoIt3" Case FileExists($INP_AutoitDir & "\au3check.exe") ; Case Else ConsoleWrite("! Unable to determine the location of the AutoIt3 program directory!" & @CRLF) EndSelect EndIf If Not FileExists($SciTE_Dir & "\SciTE.exe") Then $SciTE_Dir = $CurrentAutoIt_InstallDir & "\SciTE" EndIf ; Get Predefined settings from the Scriptfile itself. These will override all other settings This code assumes the default installation of S4AI3 in AutoIt3\SciTE. Link to comment Share on other sites More sharing options...
Creator Posted July 12, 2008 Author Share Posted July 12, 2008 (edited) The AutoIt3Wrapper is reasonable stable but isn't perfect. There is soo much happening in its bound to have issues. I have posted a script a years or 2 ago that will modify your registry to allow autoit/scite to be ran from any USB drive and will remove/change back the registry to its original settings when you stop running it.The registry trick is a good solution but has 1 major disadvantage. It requires admin rights (writing localmachine). And that's kinda of a sin in portable applications land For me just letting point au3.properties to the portable location works excellent. And requires no admin rights on the host!And for the "problem" with the hosts which have autoit already installed: i already built in a check for the existence of an autoit3 installation and the launcher will tell me at startup.If that happens i know i must avoid using autit3wrapper and run aut2exe manualy (or use the lcoally installed version to develop). Its absolutely not the best possible solution, but for me it does the trick muttley Luckely the rate of pc's i use my portable edition of autoit on that have autoit already installed is about 1%. Edited July 12, 2008 by Creator Link to comment Share on other sites More sharing options...
Developers Jos Posted July 12, 2008 Developers Share Posted July 12, 2008 (edited) Here's a few tweaks for AutoIt3Wrapper_Gui to finish off the portability (still not implemented in any official or beta release). You'll also have to adjust the includes for the new versions of AutoIt to compile it. Just find the sections and adjust to match what I have (it's all near the top of the script). #include <Date.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <ComboConstants.au3> #include <GuiTab.au3> #include <File.au3> ............... --> Remove Opt("RunErrorsFatal", 0) ............... ~ line 255 If $INP_AutoitDir = "" Then $INP_AutoitDir = StringLeft(@ScriptDir, StringInStr(@ScriptDir, "\Scite") - 1) $CurrentAutoIt_InstallDir = $INP_AutoitDir $CurrentAutoIt_InstallDirBeta = $INP_AutoitDir & "\Beta" Select Case FileExists(@ProgramFilesDir & "\AutoIt3\Au3Check.exe") $INP_AutoitDir = @ProgramFilesDir & "\AutoIt3" Case FileExists($INP_AutoitDir & "\au3check.exe") ; Case Else ConsoleWrite("! Unable to determine the location of the AutoIt3 program directory!" & @CRLF) EndSelect EndIf If Not FileExists($SciTE_Dir & "\SciTE.exe") Then $SciTE_Dir = $CurrentAutoIt_InstallDir & "\SciTE" EndIf ; Get Predefined settings from the Scriptfile itself. These will override all other settings This code assumes the default installation of S4AI3 in AutoIt3\SciTE. Updated my "working copy" of AutoIt3Wrapper_GUI with your proposed code so it will be in the next version. Thanks Jos EDIT: Uploaded to the Beta directory. muttley Edited July 12, 2008 by 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