Jump to content

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


Recommended Posts

Hello,

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.

Link to comment
Share on other sites

  • Moderators

codehtcmail,

Perhaps:

- 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. ;)

M23

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:

Spoiler

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

 

Link to comment
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 

Send("^+{TAB}")

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 ?

Link to comment
Share on other sites

try adding shift in there

Edit,

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!

 

And

 

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

Plz post your code...

My video tutorials : ( 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

Spoiler

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

ADO - Wiki

 

Link to comment
Share on other sites

Send("^+{TAB}")

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

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