Jump to content
Sign in to follow this  
=sinister=

Can't run my AutoIt files

Recommended Posts

=sinister=

I installed AutoIt on my new computer (and the beta too) and every file shows as a "au3_auto_file" and opens in notepad when I selected "run file" instead of open for my default selection. Also, the icon doesn't show up for the au3 files, only a notepad icon.

Share this post


Link to post
Share on other sites
DW1

See if this doesn't clear it up for you ;)

$FileAssociation = RegRead('HKCR\.au3', '')
If $FileAssociation <> 'AutoIt3Script' Then
    If MsgBox(36, "Default app", "Detected " & $FileAssociation & " as your default filetype for this extension" & @CRLF & "Would you like to change it to the default (AutoIt3Script) now?") = 6 Then
        RegWrite('HKCR\.au3', '', 'REG_SZ', 'AutoIt3Script')
    EndIf
EndIf
If RegRead('HKCR\AutoIt3Script\Shell', '') = 'Open' Then
    If MsgBox(36, "Default action", "Currently the default action is to Open the script" & @CRLF & "Would you like to change this to Run?") = 6 Then
        RegWrite('HKCR\AutoIt3Script\Shell', '', 'REG_SZ', 'Run')
    EndIf
ElseIf RegRead('HKCR\AutoIt3Script\Shell', '') = 'Run' Then
    If MsgBox(36, "Default action", "Currently the default action is to Run the script" & @CRLF & "Would you like to change this to Open?") = 6 Then
        RegWrite('HKCR\AutoIt3Script\Shell', '', 'REG_SZ', 'Open')
    EndIf
EndIf

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.