AutoGood Posted April 27, 2007 Share Posted April 27, 2007 I have installed the latest version to a new computer on my network, from the downloaded file on my primary computer. I used all the defaults in the install, but it doesn't act llike it should. Rather running a script when I double-click, it opens it in notepad. Second part of the problem, it's using notepad as an editor rather than SciTE4AutoIt3! Is there anyway I can get the usual default install modes, other than moving the download file to the new computer and re-installing? Link to comment Share on other sites More sharing options...
herewasplato Posted April 27, 2007 Share Posted April 27, 2007 (edited) You should not have to move the file to the computer. I've installed AutoIt many times from a file served up from a networked drive. (mapped or UNC) Just reinstall and take careful note of the options. Edit: Welcome to the forum. Edited April 27, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AutoGood Posted April 27, 2007 Author Share Posted April 27, 2007 Just reinstall and take careful note of the options.Edit: Welcome to the forum.Thanks for the reply and Welcome. I love AutoIt.During both installs, the run script selection was active. The default install put it the way I want it on the original machine, but not this time! The two machines are identical for hardware/OS. Just don't get it...Wishing for some way to 'tweak' those options. Failing that, I'll try a download and install local. Link to comment Share on other sites More sharing options...
herewasplato Posted April 27, 2007 Share Posted April 27, 2007 ...During both installs, the run script selection was active...I was afraid that you were going to say that. I've not heard of this issue before (but there is no way that I could see/remember every post - after all, I am the MSP here). Could it be a difference in user rights? <<< grasping at straws here.Try a local install like you mentioned - but do let us know the results. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 27, 2007 Share Posted April 27, 2007 (edited) The default action is controlled by a single registry key. If you look in HKEY_CLASSES_ROOT\AutoIt3Script\Shell, there are subkeys for each of the possible actions (i.e. Edit, Compile, Tidy, Run). The default value at that location determines which of those choices is, well, the default! Change HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Default between "Edit" and "Run" and see what you get. Note that the value name of "Default" in RegRead()/RegWrite() is "". To toggle it: expandcollapse popupFor $n = 2 To 0 Step - 1 _AutoItRunEdit($n) $Default = _AutoItRunEdit() MsgBox(64, "_AutoItRunEdit()", "Current setting: " & $Default) Next ; ------------------------------------------------- ; Function _AutoItRunEdit($Flag = 0) ; Toggle Run/Edit of .au3 files ; Call with: _AutoItRunEdit($Flag = 0) ; Where $Flag = 0 (default) Returns current value, makes no change ; = 1 Set to Edit ; = 2 Set to Run ; On success returns the current setting string (i.e. "Run"), after any changes ; On failure returns "" and sets @error ; ------------------------------------------------- Func _AutoItRunEdit($Flag = 0) Local $avValues[3] = ["", "Edit", "Run"] Local $RegKey = "HKEY_CLASSES_ROOT\AutoIt3Script\Shell" ; Read current value $avValues[0] = RegRead($RegKey, "") If @error Then SetError(1, @error) Return "" EndIf ; Check for changes If $avValues[0] <> $avValues[$Flag] Then RegWrite($RegKey, "", "REG_SZ", $avValues[$Flag]) If @error Then SetError(2, @error) Return "" EndIf EndIf ; Return Return $avValues[0] EndFunc ;==>_AutoItRunEdit Edited April 27, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
AutoGood Posted April 27, 2007 Author Share Posted April 27, 2007 PsaltyDS, thanks for the code. Didn't have to go poking into the Reg myself, which I feel is a good thing! I reversed the counter and step, then ran it as is. It WAS set to run in the registry as found, and ended that way after the script ran, and STILL the file opened in NotePad when double clicked! Here's the critical clue. Realized too late. In the Explorer window, the file has a text file icon! :"> DOH! Went into properties and changed the association for .au3 files to AutoIt. Now run and edit work as desired. This may have occurred because I created scripts on this machine in NotePad, and saved them with the .au3 extension, before I ever installed AutoIt. Appreciate the replies, and maybe this can help someone in the future. I'm back to being a TOTALLY happy AutoIt user. 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