Jump to content
Lepton

Visual Studio Code and running AutoIt

Recommended Posts

Have downloaded and installed AutoIt as well as ScITE and can run scripts with no issue in ScITE.

Have also installed VSC (Visual Studio Code) and have installed Damien's extension for AutoIT.

When trying to do various operations in VSC, I see:

  • F5 = command 'extension.runScript' not found
  • CTRL+F5 = command 'extension.check' not found
  • CTRL+F6 = command 'extension.launchInfo' not found
  • ALT+M = command 'extension.LaunchKoda' not found

Thanks!

Share this post


Link to post
Share on other sites

I see there are 2 others available for VSC .... But this one seems to be the most extensive ...

https://marketplace.visualstudio.com/items?itemName=4ern.4ern

I just installed it and it runs fine 

Keyboard Shortcuts :

  • Run Script: F5
  • AutoIt Check: Ctrl+F5
  • Compile Script: Ctrl+F7
  • Build Script: F7
  • Run AutoIt Help: Ctrl+F1
  • Run Au3Info: Ctrl+F6
  • Debug to MsgBox: Ctrl+Shift+D
  • Debug to Console: Alt+D
  • Run Koda: Alt+M

 

PS :

After installing the extension don't forget to RESTART VSC.

Enjoy!

 

image.png


Share this post


Link to post
Share on other sites
Excuse me, I do not know if I can keep asking about this thread.
It is the error more similar to mine that I found looking for internet and I can not solve it.
The error it gives me when I execute any script in Autoit from the vscode is the following:
"Running the contributed command: 'extension.runScript' failed"
If someone knew how to solve it, I would appreciate it
Edited by Melba23
Set standard formatting

Share this post


Link to post
Share on other sites

@yayoo I faced the same issue when accidentally deleted my "User" folder

Please follow these steps:

  1. Uninstall VS Code
  2. Go to C:/Users/%USERNAME%/AppData/Roaming (%USERNAME% is your login name) and delete these two folders: Code and Visual Studio Code
  3. Reinstall VS Code & AutoIT extension (I recommend using Damiens's extension rather than 4ern's because 4ern's can't track console output realtime - however, 4ern has better code syntax)

These actions work in my Windows 7 PC. Hope they would work in your case,too!

 

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By malicioussoap
      back when I was still doing autohotkey you could write (in code) spanisha::á
      and whenever you were in google docs or notepad you could type (in the document) spanisha  and it instantly turns it into á 
      I tried doing this in autoit, here's what I have so far (my entire code so if this language requires a main function or a return/exit to function properly please let me know):
      ;is this a proper comment? HotKeySet ( "spanisha" , "SendAltered" ) Func SendAltered() Send("á", flag = 0); EndFunc I assume that autoit follows a sort of contemporary hotkey pressing model where you have to hold all keys at the same time? which makes this impossible. So
      I'm wondering if anyone has a workaround for this? or maybe an alternative to HotKeySet()
      I have a vague memory of someone saying that doing something like spanisha:á would work. I don't know if I'm slightly off syntax but this doesn't work.
      Also I tried doing 
      ;is this a proper comment? ;HotKeySet ( "a" , "SendAltered" ) ;spanisha::á Func SendAltered() Send("á"); EndFunc just to try and debug,
      I'm also wondering if my approach is fundamentally wrong since HotKeySet() was made for something like !^A. Or if Send() is syntactically wrong.
      I'm also noticing on these forums that specifying installation is important so to whom it may concern I downloaded both installers, editor and main files. Although I'm about to be real mad if the editor installation makes a difference.
    • By shelly
      I have to press tab to reach a selected button then double click on that
      Here's my script but its not working:
      WinActivate("Policy Decisions -- Webpage Dialog","")
      Sleep(3000)
      Send("{TAB}")
      Send("{TAB}")
      Send("{TAB}")                    // at this point its working according to my need  but double click is not working
      Mouseclick("Left",510, 320, 2, 0)

    • By TheDcoder
      See this thread for info:
    • By nooneclose
      Why can I not click on either of my input fields?
      #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 730, 437, 192, 124) ;GUISetFont(14, 800, 0, "MS Sans Serif") GUISetBkColor(0xC0DCC0) Global $Label1 = GUICtrlCreateLabel("Enter your Password. UserName is auto filled", 62, 40, 604, 41, $SS_CENTER) GUICtrlSetFont(-1, 26, 800, 0, "MS Sans Serif") Global $Label2 = GUICtrlCreateLabel("User Name:", 120, 130, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Label3 = GUICtrlCreateLabel("Password:", 135, 210, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Input1 = GUICtrlCreateInput(@UserName, 274, 130, 185, 32) GUICtrlSetFont(-1, 14, 800, 1, "MS Sans Serif") Global $Input2 = GUICtrlCreateInput("Password", 274, 210, 185, 32, $ES_PASSWORD) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") Global $OK = GUICtrlCreateButton("OK", 274, 270, 185, 57) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Global $UserName = GUICtrlRead($Input1) Global $PassWord = GUICtrlRead($Input2) ExitLoop EndSwitch WEnd ; Delete the GUI window GUIDelete()  
    • By cruisepandey
      Hi, 
      I have a string like this : 
      Global $Msga = "urrent directory is /send.  (Submission of file with log number 29381077284 is confirmed)";
      I want to extract the number 29381077284  from the string. I did StringSplit to split based on "(" and then use space to reach there, But it's not a good choice. 
      Can anyone help me with regular expression to find the number from String using AutoIT. TIA
×
×
  • Create New...