Sign in to follow this  
Followers 0
Zomp

opening an example inside AutoIt.chm in SciTE

13 posts in this topic

I use SciTE editor packaged with the "standard" AutoIt download. Since some days, when I load the help file AutoIt.chm and try to open an example script using the button "Open this script" at the bottom of the help page, I see a "dos" windows appearing and quicly disappering, and the example script is not opened in the editor. I am not able to read the command line due to the too short time the window remains on the screen.

Can you help me? Thanks.

Share this post


Link to post
Share on other sites



That button quit working for me too. It used to open a new tab in SciTE with the demo script loaded, but not in the last few versions.

:D


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It is likely that the Open option for the AU3 file extension is set wrong.

I have created a small script to verify and update your registry settings to needed for the Helpfile "Open this script" button to work.

Just Cut&Paste it into SciTE, check the proper source directories at the top and Run it.

; Script to fix Registry setting for SciTE/AutoIt3/Helpfile Open Button
$Open_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe" "%1"'
$Edit_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe" "%1"'
$Run_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\AutoIt3.exe" "%1" %*'
$Open = RegRead("HKCR\AutoIt3Script\Shell\Open\Command", "")
$Edit = RegRead("HKCR\AutoIt3Script\Shell\Edit\Command", "")
$Run = RegRead("HKCR\AutoIt3Script\Shell\Run\Command", "")
If $Edit <> $Edit_SciTe Then
    If MsgBox(4, "Edit Settings for AU3", 'You "Edit" settings are currently:' & @CRLF & $Edit & @CRLF & " But should be:" & @CRLF & $Edit_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        $rc = RegWrite("HKCR\AutoIt3Script\Shell\Edit\Command", "", "REG_SZ", $Edit_SciTe)
        ConsoleWrite('RegWrite Edit $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Edit already set to default = ' & $Edit & @CRLF)
EndIf
If $Open <> $Open_SciTe Then
    If MsgBox(4, "Open Settings for AU3", 'You "Open" settings are currently:' & @CRLF & $Open & @CRLF & " But should be:" & @CRLF & $Open_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Open\Command", "", "REG_SZ", $Open_SciTe)
        ConsoleWrite('RegWrite Open $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Open already set to default = ' & $Open & @CRLF)
EndIf
If $Run <> $Run_SciTe Then
    If MsgBox(4, "Run Setting for AU3", 'You "Run" settings are currently:' & @CRLF & $Run & @CRLF & " But should be:" & @CRLF & $Run_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Run\Command", "", "REG_SZ", $Run_SciTe)
        ConsoleWrite('RegWrite Run $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Run already set to default = ' & $Run & @CRLF)
EndIf
;
;Ensure hhctrl is properly registered
$rc = RunWait(@ComSpec & " /c regsvr32 hhctrl.ocx", "", @SW_HIDE)
ConsoleWrite('+RegSvr $rc = ' & $rc & @CRLF)
Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It is likely that the Open option for the AU3 file extension is set wrong.

I have created a small script to verify and update your registry settings to needed for the Helpfile "Open this script" button to work.

Just Cut&Paste it into SciTE, check the proper source directories at the top and Run it.

; Script to fix Registry setting for SciTE/AutoIt3/Helpfile Open Button
$Open_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe" "%1"'
$Edit_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\SciTE\SciTE.exe" "%1"'
$Run_SciTe = '"' & @ProgramFilesDir & '\AutoIt3\AutoIt3.exe" "%1" %*'
$Open = RegRead("HKCR\AutoIt3Script\Shell\Open\Command", "")
$Edit = RegRead("HKCR\AutoIt3Script\Shell\Edit\Command", "")
$Run = RegRead("HKCR\AutoIt3Script\Shell\Run\Command", "")
If $Edit <> $Edit_SciTe Then
    If MsgBox(4, "Edit Settings for AU3", 'You "Edit" settings are currently:' & @CRLF & $Edit & @CRLF & " But should be:" & @CRLF & $Edit_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        $rc = RegWrite("HKCR\AutoIt3Script\Shell\Edit\Command", "", "REG_SZ", $Edit_SciTe)
        ConsoleWrite('RegWrite Edit $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Edit already set to default = ' & $Edit & @CRLF)
EndIf
If $Open <> $Open_SciTe Then
    If MsgBox(4, "Open Settings for AU3", 'You "Open" settings are currently:' & @CRLF & $Open & @CRLF & " But should be:" & @CRLF & $Open_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Open\Command", "", "REG_SZ", $Open_SciTe)
        ConsoleWrite('RegWrite Open $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Open already set to default = ' & $Open & @CRLF)
EndIf
If $Run <> $Run_SciTe Then
    If MsgBox(4, "Run Setting for AU3", 'You "Run" settings are currently:' & @CRLF & $Run & @CRLF & " But should be:" & @CRLF & $Run_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Run\Command", "", "REG_SZ", $Run_SciTe)
        ConsoleWrite('RegWrite Run $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Run already set to default = ' & $Run & @CRLF)
EndIf
;
;Ensure hhctrl is properly registered
$rc = RunWait(@ComSpec & " /c regsvr32 hhctrl.ocx", "", @SW_HIDE)
ConsoleWrite('+RegSvr $rc = ' & $rc & @CRLF)
Sure enough, that fixed it. The results seem to indicate hhctrl.ocx was the only part not already set correctly. I wonder how that changed, since it used to work and quit at some point?

>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\temp\Test\Test2.au3"   
+Edit already set to default = "C:\Program Files\AutoIt3\SciTE\SciTE.exe" "%1"
+Open already set to default = "C:\Program Files\AutoIt3\SciTE\SciTE.exe" "%1"
+Run already set to default = "C:\Program Files\AutoIt3\AutoIt3.exe" "%1" %*
+RegSvr $rc = -1073741510
+>09:01:12 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 95.633

Anyway, thanks for the tweak, Jos!

:D


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

Share this post


Link to post
Share on other sites

Sure enough, that fixed it. The results seem to indicate hhctrl.ocx was the only part not already set correctly. I wonder how that changed, since it used to work and quit at some point?

Let me guess: you didn't change anything to break it :D

The issue with registering hhctrl.ocx has been reported regularly but really doesn't have any relation with AutoIt3 and the Helpfile installation. We are just using standard functionality that is supposed to work "out-of-the-box"

Guess the OP's problem is that the definition for "Open" is set to AutoIt3.exe in stead of SciTE which would cause the script to run in stead of open in SciTE.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Guess the OP's problem is that the definition for "Open" is set to AutoIt3.exe in stead of SciTE which would cause the script to run in stead of open in SciTE.

Sorry, your script did not solve my problem. :D

Anyhow, even before launching your script, Edit command worked fine when invoked from the right clic menu on the script file. But the example scripts in chm file continue to be not opened in SciTE.

Share this post


Link to post
Share on other sites

Let me guess: you didn't change anything to break it :D

The issue with registering hhctrl.ocx has been reported regularly but really doesn't have any relation with AutoIt3 and the Helpfile installation. We are just using standard functionality that is supposed to work "out-of-the-box"

Weeeelllllll... :D

Honestly, all I've done is keep installing the latest Prod/Beta versions as they become available (using the installer's default to uninstall the old version first). The "Open this Script" button in the help file demos was working, and then quit at some point a while ago (not recently). It appeared to me to have happened on three XP boxes at about the same time, but I couldn't say exactly when as I never considered it a big deal, just a minor annoyance.

Guess the OP's problem is that the definition for "Open" is set to AutoIt3.exe in stead of SciTE which would cause the script to run in stead of open in SciTE.

Jos

I never had that part of the problem, just the broken "Open this Script" button.

Thanks again for the fix for that part, I hadn't noticed the earlier conversations about it.

:)


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

Share this post


Link to post
Share on other sites

Sorry, your script did not solve my problem. :D

Anyhow, even before launching your script, Edit command worked fine when invoked from the right clic menu on the script file. But the example scripts in chm file continue to be not opened in SciTE.

I was talking about "Open" not "Edit".

As far as I know, the used Object:

<OBJECT id=hhctrl type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" width=58 height=57>
Uses the Open definition of the File to be opened.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I was talking about "Open" not "Edit".

Argh!, what a stupid I am! :D

Yes, you were right in your guess. Now it is all OK. Thanks. :D

Share this post


Link to post
Share on other sites

Argh!, what a stupid I am! :D

Yes, you were right in your guess. Now it is all OK. Thanks. :D

NP... Just for my curiosity: Didn't the posted script tell you it was different ?

:)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

NP... Just for my curiosity: Didn't the posted script tell you it was different ?

:D

The script did not indicate any error because the keys in the registry were right. But I changed the application to open au3 files (via right clic -> Properties -> Open with -> Change) and I forgotten to have done this. I do not know why such a change has been possible without modifying the registry... :D

Share this post


Link to post
Share on other sites

The script did not indicate any error because the keys in the registry were right. But I changed the application to open au3 files (via right clic -> Properties -> Open with -> Change) and I forgotten to have done this. I do not know why such a change has been possible without modifying the registry... :D

Ok, thanks for the feedback... This means I need to add some test in my script to also find that possibe issue.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Updated version of FixHelpFileExamples.au3 that will also check for the manuallly set "Open" program.

Jos

; Scriptname: FixHelpFileExamples.au3
; Script to fix Registry setting for SciTE/AutoIt3/Helpfile Open Button
;
If Not FileExists(@ScriptDir & '\Autoit3.exe') then
    MsgBox(16,"Autoit3.exe error",'File Autoit3.exe not found. Place this script in the AutoIt3 program directory and run it again.')
    Exit
EndIf
If Not FileExists(@ScriptDir & '\SciTE\SciTE.exe') then
    MsgBox(16,"SciTE.exe error",'File ..\SciTE\SciTE.exe not found. Something is not installer the standard way. Exiting.')
    Exit
EndIf
$Open_SciTe = '"' & @ScriptDir & '\SciTE\SciTE.exe" "%1"'
$Edit_SciTe = '"' & @ScriptDir & '\SciTE\SciTE.exe" "%1"'
$Run_SciTe = '"' & @ScriptDir & '\AutoIt3.exe" "%1" %*'
$Open = RegRead("HKCR\AutoIt3Script\Shell\Open\Command", "")
$Edit = RegRead("HKCR\AutoIt3Script\Shell\Edit\Command", "")
$Run = RegRead("HKCR\AutoIt3Script\Shell\Run\Command", "")
$FixedOpen = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application")
; Check for "Always open with settings 
If $FixedOpen <> "" Then
    If MsgBox(4, "Override setting for Open on .AU3", 'You have specified to "Always Open" with:' & @CRLF & $FixedOpen & _
            @CRLF & " But this should be removed and the standard setting should be used!" & _
            @CRLF & @CRLF & "Click Yes to Remove this Keys") = 6 Then
        $rc = RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application")
        ConsoleWrite('-RegDelete ("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.au3", "Application") $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    Else
        ConsoleWrite('! Override setting for Open on .AU3 not removed' & @CRLF)
    EndIf
Else
    ConsoleWrite('+No Open override on .au3.' & @CRLF)
EndIf
; Check Edit Settings
If $Edit <> $Edit_SciTe Then
    If MsgBox(4, "Edit Settings for AU3", 'Your "Edit" settings are currently:' & @CRLF & $Edit & @CRLF & " But should be:" & @CRLF & $Edit_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        $rc = RegWrite("HKCR\AutoIt3Script\Shell\Edit\Command", "", "REG_SZ", $Edit_SciTe)
        ConsoleWrite('-RegWrite Edit $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Edit already set to default = ' & $Edit & @CRLF)
EndIf
; Check Open Settings
If $Open <> $Open_SciTe Then
    If MsgBox(4, "Open Settings for AU3", 'Your "Open" settings are currently:' & @CRLF & $Open & @CRLF & " But should be:" & @CRLF & $Open_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Open\Command", "", "REG_SZ", $Open_SciTe)
        ConsoleWrite('-RegWrite Open $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Open already set to default = ' & $Open & @CRLF)
EndIf
; Check Run Settings
If $Run <> $Run_SciTe Then
    If MsgBox(4, "Run Setting for AU3", 'Your "Run" settings are currently:' & @CRLF & $Run & @CRLF & " But should be:" & @CRLF & $Run_SciTe & @CRLF & @CRLF & " Update?") = 6 Then
        RegWrite("HKCR\AutoIt3Script\Shell\Run\Command", "", "REG_SZ", $Run_SciTe)
        ConsoleWrite('-RegWrite Run $rc = ' & $rc & "  @Error=" & @error & @CRLF)
    EndIf
Else
    ConsoleWrite('+Run already set to default = ' & $Run & @CRLF)
EndIf
;
;Ensure hhctrl is properly registered
$rc = RunWait(@ComSpec & " /c regsvr32 hhctrl.ocx", "", @SW_HIDE)
ConsoleWrite('+RegSvr $rc = ' & $rc & @CRLF)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          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  
Followers 0