Copying Data From an Application Into Macro Scheduler
Moderators: JRL, Dorian (MJT support)
Copying Data From an Application Into Macro Scheduler
I am trying to copy data from an application window into MS. The data I wish to get is in a table. Using the mouse, I can only select a row in the table. Copying the row of data to the clipboard then pasting the data to Notepad does not work. The pasted data is just old data in the clipboard.
Using View System Windows, it shows the main window of the application and I assume 3 child windows under the main window. One of those child windows class name is SysListView32 and its title is List1. Googling, I found out that this is a List View Control in Report View. The command GetWindowText> using either the main window title or the child window title does not copy the data.
Is there a way I can copy the data from this List View Control?
Using View System Windows, it shows the main window of the application and I assume 3 child windows under the main window. One of those child windows class name is SysListView32 and its title is List1. Googling, I found out that this is a List View Control in Report View. The command GetWindowText> using either the main window title or the child window title does not copy the data.
Is there a way I can copy the data from this List View Control?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Re copying into Macro Scheculer...what will you do with it when it is copied? Macro Scheduler does not hold data. It only creates and uses temporary variables passing data back and forth among other programs. No data is available when script is completed except information written to other files.
That being said, perhaps the following may generate some ideas:
===============================
Any way you can "export" the table to a file? If Yes, then you can read the file into Macro Scheduler with ReadLn..
It does not sound like a web page, but, if this is a table on a web page, then you could open the Source Code and copy to clipboard from there? (Actually if a web page table, no reason you shouldn't be able to copy directly to clipboard).
Or you could save the page as a file and use ReadLn to get it into Macro Scheduler.
What is the application name?
Is there a link where this can be seen by one of us?
If Yes, also provide info about what data you are trying to copy.
That being said, perhaps the following may generate some ideas:
===============================
Any way you can "export" the table to a file? If Yes, then you can read the file into Macro Scheduler with ReadLn..
It does not sound like a web page, but, if this is a table on a web page, then you could open the Source Code and copy to clipboard from there? (Actually if a web page table, no reason you shouldn't be able to copy directly to clipboard).
Or you could save the page as a file and use ReadLn to get it into Macro Scheduler.
What is the application name?
Is there a link where this can be seen by one of us?
If Yes, also provide info about what data you are trying to copy.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Re: Bob's Questions
Thanks for your comment. Per your questions.
I hope to assign the data to variables in MS.
Unfortunately, there is no way to export the data from the application to a file.
The window is not a web page. It is a custom written application. I do not have access to the application source code.
Unfortunately, it is an application that runs behind a firewall.
I hope to assign the data to variables in MS.
Unfortunately, there is no way to export the data from the application to a file.
The window is not a web page. It is a custom written application. I do not have access to the application source code.
Unfortunately, it is an application that runs behind a firewall.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Just looking for some more hints to help out......
A basic problem seems to be that you cannot copy from that screen into the clipboard, is that correct?
You said it did not paste into Notepad, have you tried to paste into any other programs? Unicode can sometimes be an issue. Have you tried to paste into Wordpad?
A basic problem seems to be that you cannot copy from that screen into the clipboard, is that correct?
You said it did not paste into Notepad, have you tried to paste into any other programs? Unicode can sometimes be an issue. Have you tried to paste into Wordpad?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Loop
ln ++
{
ControlFocus, SysListView32 , List1
Control, Choose, %ln%, SysListView32 , List1
ControlGetText, OutputVar, SysListView32 , List1
If Errorlevel = 0
Break
MsgBox, %OutputVar%
FileAppend, %OutputVar%`n, C:\MyListContent.txt
}
-----
ControlFocus [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Sets input focus to a given control on a window
-----
Control, Cmd [, Value, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Makes a variety of changes to a control. e.g.
Choose, N: Sets the selection in a ListBox or ComboBox to be the Nth entry. N should be 1 for the first entry, 2 for the second, etc.
-----
ControlGetText
Retrieves text from a control.
-----
Maybe someone can advise how to accomplish that with Macro Scheduler (and/or VBS) - if not you can Google for ControlSend (in one word!)
ln ++
{
ControlFocus, SysListView32 , List1
Control, Choose, %ln%, SysListView32 , List1
ControlGetText, OutputVar, SysListView32 , List1
If Errorlevel = 0
Break
MsgBox, %OutputVar%
FileAppend, %OutputVar%`n, C:\MyListContent.txt
}
-----
ControlFocus [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Sets input focus to a given control on a window
-----
Control, Cmd [, Value, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Makes a variety of changes to a control. e.g.
Choose, N: Sets the selection in a ListBox or ComboBox to be the Nth entry. N should be 1 for the first entry, 2 for the second, etc.
-----
ControlGetText
Retrieves text from a control.
-----
Maybe someone can advise how to accomplish that with Macro Scheduler (and/or VBS) - if not you can Google for ControlSend (in one word!)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
AutoHotkey Looks Interesting
Open Source does it again. I am going to have to check AutoHotkey out. Although, I have been very happy with MS.
Thanks Lumumba
Thanks Lumumba
As both scripting tools (MSched + AHK) offers a compiler you can mix the best of both worlds ... e.g. something like this:

The standard:
CMD = WinNT/W2K/XP
Command = W9x/ME
Just a quick sample right out of my head.MyMainMSchedScript.scp
Input>Name,Please enter your name ...
Run Program>CMD /C MyCompiledAHKCatchAControlScript.exe %Name%
WaitWindowOpen, NotePadInspector
Execute>d:\mypic.bmp
-----
MyCompiledAHKCatchAControlScript.exe
Name = %1%
Status = unsuccessfull
Loop
{
ControlGetText, OutputVar, Edit1, Untitled -
If OutputVar = %Name%
{
ControlSetText, Edit1, Gotcha `!, Untitled -
RunWait, MyMSchedScreenCapture.exe
Status = successfull
Break
}
}
MsgBox, 0, NotePadInspector, Done %Status%., 10
-----
MyCompiledMSchedScreenCapture.exe
GetActiveWindow>window_title,X,Y
ScreenCapture>%X%,%Y%,200,200,d:\mypic.bmp


The standard:
CMD = WinNT/W2K/XP
Command = W9x/ME