Jump to content
Sign in to follow this  
AnonymousX

[Solved] Scripts opening in editor instead of running

Recommended Posts

So I just got a new computer, and instantly went and installed Autoit onto it. I selected run script as default action when clicking on an au3 file, however every time I do this it opens the script in the editor. I can from there run the script no problem.

I've tried reinstalling and checking the settings by hitting "Ctrl+1" and have confirmed it is set to run, but yet it just continues to open in the editor.

Any ideas why this is happening or how to solve?

New system is windows 10, old was windows 7

Edited by AnonymousX

Share this post


Link to post
Share on other sites

This means you have changed the default as the AutoIt3 installer will use Run() as default.
Did you also install SciTE4AutoIt3?

If so: run SciTEConfig and select option Other tools/Run AutoIt3/SciTE check. The top part of the output will tell you whether you have still a standard install setting in the registry or if you have modified that. Can you post that information here so I can have a look?

Jos

Edited 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.
  :)

Share this post


Link to post
Share on other sites

@Jos

 

All I did was go to:

https://www.autoitscript.com/site/autoit/downloads/

download Autoit and download the editor. It had checked off the default of run not open editor but still always opens it rather than runs.

For good measure I tried uninstalling and reinstalling one more time but got the same results.

 

******************************************************************************************************************************************
!*  Found always open with Win7    :Applications\SciTE.exe
!*  Fixed by removing Registry key : "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3\Userchoice"
* HKCR\.au3 Default       :AutoIt3Script
* HKCR\.au3 ShellNew      :C:\WINDOWS\SHELLNEW\Template.au3 (File Exists)
******************************************************************************************************************************************
* Explorer shell options:
* HKCR\AutoIt3Script\shell: 
*  => Default Action:Run
*     Compile                => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l"
*     Compile with Options   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /in "%l"
*     CompileX64             => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe_x64.exe" /in "%l"
*     CompileX86             => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l"
*     Edit                   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1"
*     Open                   => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1"
*     Run                    => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %*
*     RunX64                 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "%1" %*
*     RunX86                 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %*
******************************************************************************************************************************************
* User SciTE info:
*    SCITE_USERHOME:C:\Users\anom\AppData\Local\AutoIt v3\SciTE: 
*    Directory missing: C:\Users\anom\AppData\Local\AutoIt v3\SciTE\SciTE Jump
*    SciTEUSer.Properties: 
*-----------------------------------------------------------------------------------------

import au3.UserUdfs
import au3.keywords.user.abbreviations
******************************************************************************************************************************************

 

Share this post


Link to post
Share on other sites

@Jos

 

Okay so I went into the editor hit "ctrl+1" then tried switching it over to edit instead of run. Restarted computer. 

So then it said edit, switched it back to run, and restarted again and it seems to be working properly now!

I don't know why that happened but everything is good. 

Share this post


Link to post
Share on other sites

As you can see in the output from SciTEConfig: There was a manual "Always Open with" done one time on this computer, so it will indeed give the issue you describe as swapping between Run/Open doesn't do anything when this is the case. The Output does suggest the fix as well and to remove the described registry key.

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.
  :)

Share this post


Link to post
Share on other sites

@Jos

The issue came back so I'm guessing I need to do as you mentioned and removed the registry key. How is the best way to do this?

Run an Autoit script:

RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3\Userchoice")

?

*edit* It didn't so much come back rather I fixed it for 1 particular file and noticed when opening a second file it was back to opening rather then running.

Edited by AnonymousX

Share this post


Link to post
Share on other sites

You could simply open the regedit and do it manually. I didn't want to do it in the script but merely indicate what the issue is.

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.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Professor_Bernd
      Hello.
      PSPad4AutoIt3 consists of the Editor PSPad and the Improvement Kit, and can be used as an portable Editor IDE for AutoIt3.
      The author of the PSPad Editor is Jan Fiala. I (Professor Bernd) am only the author of the Improvement Kit.
       
      After months of work, PSPad4AutoIt3 version 1.0.0 beta is now ready.  
      I like to call it the "first real" version, because the Improvement Kit now handles a lot of things autonomously. So PSPad remains operable when an au3 script is started. Also there is now a setup that makes the installation easier. 👍 And for those who don't like/do not want an installer, there is a download without setup. Without setup, the user has to take care of the prerequirements himself. Only recommended for experienced users.
      The core functionalities "Run, Check Syntax, Compile and Comile Dialog" are integrated and work very well. Thanks to @Jos for extending AutoIt3Wrapper!  There are also a few more features that you can find in the main menu, menu item "Scripts" => "_AutoIt". These include "Debug to Console", "Debug to MsgBox" and the "Koda FormDesigner" as a helper for creating GUIs. In this menu there is also an item "_Tips and shortcuts". After a click the AutoIt-relevant shortcuts are displayed.
      The language in the menu "_AutoIt" is English. The language for PSPad in general can be set for more than 40 languages (Main menu => Settings => Program Settings => Language).
      PSPad4AutoIt3 is in a beta stage and does not have many features yet. But I am working on it!
      More information (EN, DE) and the download can be found in my PSPad4AutoIt3 Projekt in the AutoIt.de forum.
      I would be glad if you have a look at it and write me your opinion. Have fun!
       
      2020-04-20 Note: The minimum version for AutoIt3 HAS TO BE 3.3.14.5!

      I had hoped that the changes would not be so severe, so in the downloads the minimum version 3.3.14.0 is still indicated. Unfortunately, it has recently become apparent that with older versions the main functions, e.g. CompilerRunner, the AutoIt3 Help and the upcoming CallTipViewer, fail.

      The downloads can be used so far, but everybody has to take care of the AutoIt3 version 3.3.14.5 by himself!
      Thank you very much,
      Bernd.
       
      New version PSPad4AutoIt3 v1.2.0 beta (2020-08-03). Download in Posting # 1 , Info Details
    • By WoodGrain
      Hi All,
      Trying to open windows explorer to a WebDav location and it's not working quite how I want, on the computers it is setup as a "network location" (as opposed to a "mapped drive", and this unfortunately can't be changed), the "Data" WebDav folder sits directly under "This PC" if that's an easier way to get to it. any suggestions as to what I can correct to get the 2nd example to work?
      ; This works, but I'm trying to avoid this as users normally see the URL style in the 2nd example below $folderToOpen = "\\mycompany.sharepoint.com@SSL\DavWWWRoot\Data" Run("Explorer.exe " & $folderToOpen) ; This does not work, it tries to open the WebDav url in the default web browser $folderToOpen = "https://mycompany.sharepoint.com/Data" Run("Explorer.exe " & $folderToOpen) ShellExecute also opens it in the default browser.
      Saw _WinAPI_ShellOpenFolderAndSelectItems but couldn't get the 2nd example to work.
      If I manually open Windows Explorer and paste in https://mycompany.sharepoint.com/Data it loads the WebDav directory without issue.
      If I have to use the pathing from the first example it is fine, just trying to give users a familiar experience.
      Thanks!
    • By nacerbaaziz
      hello autoit team
      is there any wey to check if any process run as admin or no?
      i mean e.g if i want to restart any process, now i have the ability to get the process path and commands line
      what i need is a wey to check if the process was runing as admin or no to restart it with the same state.
      here is the part that am using it to restart the process
      func _processRestart($i_pid, $s_ProcessPath) if not (ProcessExists($i_ProcessPid)) then return SetError(1, 0, -1) local $s_ProcessWorkDir = _WinAPI_GetProcessWorkingDirectory($i_ProcessPid) ProcessClose($i_ProcessPid) ProcessWaitClose($i_ProcessPid) ProcessWait(ShellExecute($i_pid,"", $s_ProcessWorkDir)) ProcessesGetList() return true endFunc thanks in advance
    • By Fenzik
      Hello All!
      i suggest to set default encoding in Scite4 for Autoit 3 to UTF 8 with Bom encoding, format recommended also in Autoit Help.
      In last editor version, when i open new script, for example Czech characters (č, ř, ž) aren't correct.
      So when i change Encoding to UTF 8 with Bom from Default Code page property state, everithing seems to be OK.
      Thank you and sorry for potentialy duplicated content.
      Fenzik
    • By Xandy
      What's new section:
      Snowman_Sky is game using MapIt engine.  MapIt will evolve here for a little bit.
      Download: [ http://songersoft.com/programming/Snowman_Sky.zip ]
      Video demonstrating new sprite_sheet class and weather effect.
      Working on the Class section of the Character Sheet.
      Which is what makes multiclassing possible.

      Changing the value of Class will load the stored value for XP.  Lvl will be updated to the XP tier.
      Hit points are then rolled for each level of all learned classes.  Hit dice are specific to each class and a Constitution modifier is added to each roll of hit die.
       
×
×
  • Create New...