Sign in to follow this  
Followers 0
nbala75

Suggestion for running multiple scripts

4 posts in this topic

Suggest me how to run multiple scripts which are just the same

I have data in the form of couple of lines in a txt file and for each line, I need to run same script, although i may not know which one to run first and in which order.

Right now i intend to take multiple copies of the same script and name it sequentially. Then i can run a loop for each line in the text file and keep the script ready(hold it) with a msgbox open. When line1 from txt file ready to get executed, then i will press OK on the msgbox of line1. And same way for other lines.

Is there a better way to do this???

Share this post


Link to post
Share on other sites



Suggest me how to run multiple scripts which are just the same

Can you post an Example of this multiple scripts

AND

the typical text you want to run it on.

Maybe also:

Any logic to detirmane what should be run in your script?


Share this post


Link to post
Share on other sites

Can you post an Example of this multiple scripts

AND

the typical text you want to run it on.

Maybe also:

Any logic to detirmane what should be run in your script?

1. Txt file contains lines like these

Posted Image

2. I use each of these lines to process orders in order placement screen

3. Logic is nothing but whether the order can be placed or not which will be determined by me manually. So, typically, i decide when to process order for that particular line in txt file. I may required to process orders one by one in very quick succession.

4. I may skip process for one/some lines.

5. I just make use of these fields in a particular line and SEND those to relevant fields in IE browser.

Thanx for ur interest

Share this post


Link to post
Share on other sites

Posted Image

Well if you need the file open while making the decision you can split the contents of that line to an array. Then use that to populate the

IE Browser. Can use the _IE for that purpose as well.

;>>>   Make sure the curser is at the beginning of the line before hitting Shif-Alt-s !!!!! <<<
#include <Array.au3>
#include <Constants.au3>

HotKeySet("{ESC}", "Terminate")
HotKeySet("+!s", "SelectMessage") ;Shift-Alt-s
Local Const $sFile = "Basic.txt"
Local $hFile = ShellExecute($sFile, "")
If $hFile = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf
While 1
    Sleep(100)
WEnd
Func SelectMessage()
    Send("{SHIFTDOWN}{end}{shiftup}")
    Send("{CTRLDOWN}c{CTRLUP}")
    $txt = ClipGet()
    $array = StringSplit($txt, " ", 0)
    _ArrayDisplay($array)
EndFunc   ;==>SelectMessage

Func Terminate()
    FileClose($sFile)
    Exit 0
EndFunc   ;==>Terminate

A better way would be to make use of "FileOpen" and control the whole process from there.


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
Sign in to follow this  
Followers 0