Jump to content

Using AutoIt in Visual Studio Code


minxomat
 Share

Recommended Posts

Just a quick one, how you can add AutoIt support in Visual Studio Code.

  1. Download Visual Studio Code
  2. Download https://github.com/backr/Visual-Studio-Code-AutoIt
  3. Put the "autoit" folder in UserName\.vscode\extensions\
  4. Restart Visual Studio Code

Now AutoIt is configured automatically for all available Visual Studio Themes:

audark7f00.png

aulight665a.png

 

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Thanks. Let me try

 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

By username, i am assuming that you mean  "C:\Users\Myname".  If so there is no folder called ".vscode". So i am going to create one.

 

Damn... I can't create a folder with the name start with a period.

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Damn... I can't create a folder with the name start with a period.

Use VSCode or SublimeText

Great plugin @minxomat. Maybe the dev team could look at adding this to AutoIt, autoit.tmLanguage at least.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Might be a silly question but how can I execute the code / compile the code?

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

By username, i am assuming that you mean  "C:\Users\Myname".  If so there is no folder called ".vscode". So i am going to create one.

 

Damn... I can't create a folder with the name start with a period.

No, i mean Username.

If your username is cat, then put the "autoit" folder from the download in C:\Users\cat\.vscode\extensions\ so that there is now a folder C:\Users\cat\.vscode\extensions\autoit.

Edited by minxomat

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Great plugin @minxomat. Maybe the dev team could look at adding this to AutoIt, autoit.tmLanguage at least.

@UEZ To run something you have to edit launch.json and put in the appropriate paths. Take a look at the online VSC Helpfile for that, they explain it much better than me. If you do it, please create a pull req on github so I can integrate it. Then the plugin would be ready to be pushed to the MS Marketplace.

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

@minxomat , I have installed vs code, but there is no folder in C:\Users\Vinod\. named ".vscode".
 I think i need to install it again. 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@minxomat Is that sure that installation of vscode will make a folder in C:\Users\UserName\ ?. I have tried twice. But no folder created in that location. Is this a problem of my setup file ?. 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

@minxomat Is that sure that installation of vscode will make a folder in C:\Users\UserName\ ?. I have tried twice. But no folder created in that location. Is this a problem of my setup file ?. 

Enter the path directly. .-preceeded folders are hidden by default. If you have VSC installed, the folder is guaranteed to be there. Please refer to the VSC online help if you still have this problem.

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

At last problem solved. It was my setup file's error. It was a 52 MB sized file. Then i have downloaded a new version which has only 42 MB. After installation, i found a folder named ".vscode". Now i am searching for how to run my code in code.

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

  • 2 weeks later...

There are few ways. One could be to open folder with the script (open with VS Code) and then View->Command Palette..->Tasks:Configure Task Runner, and then paste this and save the document (check and set correct paths below before that):

// A task runner
{
    "version": "0.1.0",
    // The command
    "command": " ",
    // The command is a shell command?
    "isShellCommand": true,
    // Task name will be omited from the command line?
    "suppressTaskName": true,
    // Add some options
    "options": {
        //The current working directory of the executed program or shell
        "cwd": "C:\\Program Files (x86)\\AutoIt3\\"
    },
    // Define few tasks
    "tasks": [
        {
            "taskName": "Run",
            "args": [
                "autoit3.exe /ErrorStdOut \"${file}\""
            ],
            // If this property is set to true, Ctrl+Shift+T will trigger this task
            "isTestCommand": true
        },
        {
            "taskName": "Run x64",
            "args": [
                "autoit3_x64.exe /ErrorStdOut \"${file}\""
            ]
        },
        {
            "taskName": "Compile",
            "args": [
                ".\\Aut2Exe\\Aut2exe.exe /in \"${file}\""
            ],
            // If this property is set to true, Ctrl+Shift+B will trigger this task
            "isBuildCommand": true
        }
    ]
}

Then you can crtl+shift+T or ctrl+shift+B or just choose the task you want from the tasks (View->Command Palette..->Tasks: Run Task).

You can use it to run Jos's wrapper to get more control if you are used to that.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 3 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...