Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Installing an older version of AutoIT and SciTE breaks my code

$
0
0
Recently, I updated AutoIT to v3.3.12.0 and found that due to some of the SCRIPT BREAKER changes that broke too many of my scripts, I had to uninstall AutoIT and SciTE.  When I reinstalled AutoIT (3.3.10.2) and SciTE4AutoIT (14.801.2025.0), I somehow lost the hooks to run my private Lua scripts from the right click context menu.
 
I've been using my Lua scripts for a while before this so I know there's not a script error.
 
Here's how I added my Lua scripts:
  I copied these files from a local directory C:\Users\Andy
   au3.properties
   PersonalTools.lua
   SciTEUser.properties
 
  The au3.properties file looks like this:
    # Add a _DebugOut statement that displays the hilighted     # data or the word under the cursor like this:     #   _DebugOut("+++: hilighted-text = " & hilighted-text)     command.name.44.$(au3)=     command.subsystem.44.$(au3)=3     command.44.$(au3)=InvokeTool AutoItTools.addDebugOut     command.save.before.44.$(au3)=2
  The PersonalTools.lua file looks like this:
AutoIt         
------------------------------------------------------------------------------- -- required line ... do not remove PersonalTools = EventClass:new(Common) -- -- Trap the OnStartup event --    Create the user shortcut menu -- -- -- Trap the OnOpen event --    Call the createUserContextMenu() function to create a user --    context menu tailored to the file type (lexor) of the file --    being opened. function PersonalTools:OnOpen()     createUserContextMenu(self) end -- -- Create a user context menu tailored to the file type (lexer) -- of the file being opened or switched to. function createUserContextMenu(self)     -- print(self:GetLexer())     if self:IsLexer(SCLEX_AU3) then             --print("AU3 lexer")             props['user.context.menu'] = "|"             .. "|add _DebugOut          | 1144"     end end function PersonalTools:GetLexer(lexer)     return editor.Lexer end -- IsLexer() -------------------------------------------------------------------------------- -- AutoItTools:addDebugOut() -- -- Add a _DebugOut statement that displays the hilighted data or -- the word under the cursor like this: --   _DebugOut("+++: hilighted-text = " & hilighted-text) -------------------------------------------------------------------------------- -- function AutoItTools:addDebugOut()     local word = editor:GetSelText()     if word == ""  or word == nil then         word = self:GetWord()     end             if word ~= nil and word ~= "" then         editor:LineEnd()         editor:NewLine() --                      _Debugout( "+++: word = " & word)         editor:AddText('_Debugout( "+++: ' .. word .. ' = " & ' .. word .. ')')     else         print("The cursor not is not on any hilighted text.")     end end

I see my command when I right click on a word, but then nothing happens when I choose my command from the menu.

        
 

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>