 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Jonathan
Joined: 08 Oct 2003 Posts: 13
|
|
Manipulating dialog boxes with Event Server |
|
This may seem elementary, but I am having trouble manipulating dialog boxes using Event Server. I want to be able to tab through the fields of the box and possibley enter text as well.
I have 'Window Appearance' as my monitored event for a specific window. I have this part working correctly. The action of 'Run Program' to manipulate the dialog window doesn't seem to be working, though.
I have tried using a .wsf file as the program to run, but it doesn't work. The file does work if I run it from the Run command line, though.
Is there any easy way to do this that I am missing? I have looked through the documentation but haven't seen anything.
|
|
Wed Aug 16, 2006 12:31 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Manipulating dialog boxes with Event Server |
|
.WSF is not an executable file. Executable files in Windows are .EXE, .COM, .BAT, .CMD. All other files require that you either specify the full command including the application that knows how to run these files or use the command processor with "start" switch to lookup the registred application and pass the file name on the command line, for example, cmd /C start c:\files\myfile.wsf In case if your file has spaces in the name or path enclose the entire name in double quotes as in example below cmd /C start "c:\program files\my file.wsf" : This may seem elementary, but I am having trouble manipulating dialog boxes : using Event Server. I want to be able to tab through the fields of the box : and possibley enter text as well. : I have 'Window Appearance' as my monitored event for a specific window. I : have this part working correctly. The action of 'Run Program' to : manipulate the dialog window doesn't seem to be working, though. : I have tried using a .wsf file as the program to run, but it doesn't work. : The file does work if I run it from the Run command line, though. : Is there any easy way to do this that I am missing? I have looked through the : documentation but haven't seen anything.
|
|
Wed Aug 16, 2006 12:53 am |
|
 |
Jonathan
Joined: 08 Oct 2003 Posts: 13
|
|
Re: Manipulating dialog boxes with Event Server |
|
Ok, that makes sense. I tried it using the quotes and the command prompt opened up, but the file path did not write. Do I need to put this in the Standard Input parameter? I manually put the past in with quotes and the file worked. Also, is there an easier way to manipulate or close dialog boxes? The Examples link for Event Server states that it automates closing dialog boxes. I was wondering if I was missing something. : .WSF is not an executable file. : Executable files in Windows are .EXE, .COM, .BAT, .CMD. All other files : require that you either specify the full command including the application : that knows how to run these files or use the command processor with : "start" switch to lookup the registred application and pass the : file name on the command line, for example, : cmd /C start c:\files\myfile.wsf : In case if your file has spaces in the name or path enclose the entire name : in double quotes as in example below : cmd /C start "c:\program files\my file.wsf"
|
|
Wed Aug 16, 2006 1:05 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Manipulating dialog boxes with Event Server |
|
The entire command line should be entered into the "command line" field. Standard Input is used to send something to the program's standard input, not likely in your case. 24x7 Event Server doesn't automate closing dialog boxes. Where do you see that? Are you confusing this with Dr.Watson error popups? To close a particular box you can write a script or job in 24x7 Scheduler that can be invoked from the Event Server. For example, a simple JAL script job in 24x7 Scheduler can be like this Dim( win_handle, number ) WindowFind( "some window caption here", win_handle ) WindowClose( win_handle ) : Ok, that makes sense. : I tried it using the quotes and the command prompt opened up, but the file : path did not write. Do I need to put this in the Standard Input parameter? : I manually put the past in with quotes and the file worked. : Also, is there an easier way to manipulate or close dialog boxes? The : Examples link for Event Server states that it automates closing dialog : boxes. I was wondering if I was missing something.
|
|
Wed Aug 16, 2006 1:29 am |
|
 |
Jonathan
Joined: 08 Oct 2003 Posts: 13
|
|
Re: Manipulating dialog boxes with Event Server |
|
Ok, I will try using Scheduler with Event Server. I thought I might have to go that way. I was confused by the point number 6 on the 'Event Server Examples' Page. On the Event Server main page there is a '24x7 Event Server examples' link. # 6 states: Application and system automation, for example, automatically closing dialog boxes and entering data into interactive application forms thus eliminating a need for human processing; linking different applications into complex batch processing with the dynamic processing flow based on various conditions; and so on. So I thought this would be simple task using Event Server. I see how it will be easy with Scheduler. Thanks : The entire command line should be entered into the "command line" : field. Standard Input is used to send something to the program's standard : input, not likely in your case. : 24x7 Event Server doesn't automate closing dialog boxes. Where do you see : that? Are you confusing this with Dr.Watson error popups? To close a : particular box you can write a script or job in 24x7 Scheduler that can be : invoked from the Event Server. For example, a simple JAL script job in : 24x7 Scheduler can be like this : Dim( win_handle, number ) : WindowFind( "some window caption here", win_handle ) : WindowClose( win_handle )
|
|
Wed Aug 16, 2006 1:34 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Manipulating dialog boxes with Event Server |
|
There is also a Macro Recorder tool in the 24x7 Automation Suite package that can be used to manipulate graphical applications, although this is not a very reliable method. : Ok, I will try using Scheduler with Event Server. I thought I might have to : go that way. : I was confused by the point number 6 on the 'Event Server Examples' Page. On : the Event Server main page there is a '24x7 Event Server examples' link. # : 6 states: Application and system automation, for example, automatically : closing dialog boxes and entering data into interactive application forms : thus eliminating a need for human processing; linking different : applications into complex batch processing with the dynamic processing : flow based on various conditions; and so on. : So I thought this would be simple task using Event Server. I see how it will : be easy with Scheduler. : Thanks
|
|
Wed Aug 16, 2006 7:52 am |
|
 |
Jonathan
Joined: 08 Oct 2003 Posts: 13
|
|
Re: Manipulating dialog boxes with Event Server |
|
Right, I wanted to stay away from that because it is less reliable. But the 'example' that is given is for Event Server, not the Automation Suite. I think that point is a little misleading. Regardless, I still am unable to get this to work. I created a job in Scheduler using vbscript code that works when I run it from the run command line. I put the job name into Event Server as a parameter but it doesn't do anything. Is this because I am using the evaluation/trial version? Do I need to change some settings for Scheduler? Thanks : There is also a Macro Recorder tool in the 24x7 Automation Suite package that : can be used to manipulate graphical applications, although this is not a : very reliable method.
|
|
Wed Aug 16, 2006 10:40 am |
|
 |
Jonathan
Joined: 08 Oct 2003 Posts: 13
|
|
Re: Manipulating dialog boxes with Event Server |
|
Does Scheduler support WScript? I am trying to send keystrokes with a .vbs file but I keep getting syntax errors. It doesn't seem to like the WScript calls. Here is my code: Sub Main () dim WshShell set WshShell = WScript.CreateObject("WScript.Shell") WScript.Sleep 100 WshShell.AppActivate "Connect to ipay.adp.com" WScript.Sleep 100 WshShell.SendKeys "{TAB}" WScript.Sleep 500 WshShell.SendKeys "{TAB}" WScript.Sleep 500 WshShell.SendKeys "{TAB}" WScript.Sleep 500 WshShell.SendKeys "{TAB}" WScript.Sleep 500 WshShell.SendKeys "{ENTER}" WScript.Sleep 2500 End Sub Also, I still can't get Event Server to actually use a Scheduler job as an action. Nothing happens when I use a Scheduler job as the action, whether it is .jal, .vbs, or whatever. Thanks : Right, I wanted to stay away from that because it is less reliable. : But the 'example' that is given is for Event Server, not the Automation : Suite. I think that point is a little misleading. : Regardless, I still am unable to get this to work. I created a job in : Scheduler using vbscript code that works when I run it from the run : command line. I put the job name into Event Server as a parameter but it : doesn't do anything. Is this because I am using the evaluation/trial : version? Do I need to change some settings for Scheduler? : Thanks
|
|
Wed Aug 16, 2006 12:51 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Manipulating dialog boxes with Event Server |
|
It supports full VBS. What you do in VBS is a different matter. You can also run your VBS file as an external script. Create a program type job and specify your VBS file name for the job command line. Alternatively you can create a JAL script job like below Dim( win_handle, number ) WindowFind("Connect to ipay.adp.com", win_handle) WindowActivate( win_handle ) SendKeys ( "{WAIT 1}{TAB}{WAIT 1}{TAB}{WAIT 1}{TAB}{WAIT 1}{ENTER}" ) Or even better if you use the following Dim( win_handle, number ) WindowFind("Connect to ipay.adp.com", win_handle) WindowClose( win_handle ) : Does Scheduler support WScript? I am trying to send keystrokes with a .vbs : file but I keep getting syntax errors. It doesn't seem to like the WScript : calls. : Here is my code: Sub Main () : dim WshShell : set WshShell = WScript.CreateObject("WScript.Shell") : WScript.Sleep 100 : WshShell.AppActivate "Connect to ipay.adp.com" : WScript.Sleep 100 : WshShell.SendKeys "{TAB}" : WScript.Sleep 500 : WshShell.SendKeys "{TAB}" : WScript.Sleep 500 : WshShell.SendKeys "{TAB}" : WScript.Sleep 500 : WshShell.SendKeys "{TAB}" : WScript.Sleep 500 : WshShell.SendKeys "{ENTER}" : WScript.Sleep 2500 : End Sub : Also, I still can't get Event Server to actually use a Scheduler job as an : action. Nothing happens when I use a Scheduler job as the action, whether : it is .jal, .vbs, or whatever. : Thanks
|
|
Wed Aug 16, 2006 1:34 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|