on 2014 Jun 28 10:26 AM
Hi
I am new to both SCN and scripting and am in need of some guidance.
I have a SQ01/2 query, which gives the following results:
I have then recorded the following script:
This script works fine, but I need it to loop to the next selectedRow (which is the Delivery column) and then continue looping until there are no more lines.
I would really appreciate it if someone could help me.
Many Thanks
Smon
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Script Man
Thank you so much for the quick reply. It's not quite working yet as when it loops, the script is trying to double click on the original cell, rather than stepping to the next cell...you've certainly pointed me in the right direction though!
Kind Regards
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
Unfortunately, I do not know what name has the current cell. This name you need, you can find by Sort the corresponding column with the Script Recorder.
for example:
. .
session.findById("wnd[0]").maximize
set GRID = session.findById("wnd[0]/usr/cntlCONTAINER/shellcont/shell")
myRow = 0
if GRID.rowCount >= 1 then
do
GRID.selectedRows = cstr(myRow)
GRID.setCurrentCell myRow,"myColumn_Name"
GRID.doubleClickCurrentCell
'Here is the rest of your script after the command with ". doubleClickCurrentCell" to the end.
myRow = myRow + 1
if myRow >= GRID.rowCount then exit do
GRID.firstVisibleRow = myRow
GRID.selectedRows = cstr(myRow)
loop
end if
Regards,
ScriptMan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.