Jump to content

I have written a script, but can't execute it where I want

Recommended Posts


I have made a script for my use, it works as intended, but only 3 questions:

1- I have a for loop that starts from 1 and should end at a numeber that changes with every use. Let's say now it starts at 1 and ends at 15, but then in another use it starts at 1 and ends 20, how to prompt a dialogue asking for the endingnumber with evry new use.

2- When I start the script it always starts at the folder where it is saved, i want it to start paused and have a key or combination that will start the execution of the script where and when I need it.

3- Between the script actions some need more time than others, how to set a waiting parameter between the execution of the commands, like between command 1 and 2 have a 5 seconds delay.

Thank you.

Share this post

Link to post
Share on other sites



- 1. InputBox.

- 2. HotKeySet & FileChangeDir

- 3. Sleep

There is a very good Help file that comes with AutoIt - always a good idea to look in there to see if there are any likely candidate functions before posting. ;)


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Now here is something not in the help, with AutoIt I have set a line to toggle between tabs in Chrome, only problem is AutoIt does it in backwards, instead of going from left to right like it would normally happen, it goes fro right to left.

To explain even more, let's say I have 5 open tabs from left to right numbered 1, 2, 3, 4 and 5. I haves this line to toggle between them 


Which does Ctrl+TAB, when I manually press CTRL+TAB I go from tab 1 to 2 then 3, then 4, then 5

With AutoIt it goes from 5 to 4 then 3, then 2, then 1.

Why is this happenning ? Can someone explain ?

Share this post

Link to post
Share on other sites

try adding shift in there


Just looked at the UDF

N.B. Some programs are very choosy about capital letters and ALT keys, i.e., "!A" is different from "!a". The first says ALT+SHIFT+A, the second is ALT+a. If in doubt, use lowercase!




Send("^{TAB}") Navigate to next WindowTab (on a Tabbed dialog window) Send("^+{TAB}") Navigate to previous WindowTab.
Edited by Jewtus

Share this post

Link to post
Share on other sites

Plz post your code...

My video tutorials : HERE ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote


 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

ADO - Wiki


Share this post

Link to post
Share on other sites


Which does Ctrl+TAB


No, it doesn't. The misunderstanding seems to be that you probably thought the "+" was needed to combine the ctrl and the {TAB}, but in fact sending the "+" just means pressing shift. So your "^+{TAB}" in fact sends does ctrl combined with shift combined with {TAB}, which scrolls through the tabs backwards just like it should.
To do ctrl and tab together, write: Send("^{TAB}").
The functionality of modifier keys (!, +, ^ and #) is described in the Remarks part of the Send() helpfile.
Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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

  • Create New...