#1
|
|||
|
|||
Send keys does not run
Hello,
In this script, when the condition is not rescpected, I enter in the else but the key ENTER of the keyboard is not executed. the script : #$language = "VBScript" #$interface = "1.0" nProcesses = crt.Screen.Get(7,1,7,10) Set re = New RegExp re.Pattern = "[A-Z][0-9]{9}" If re.Test(nProcesses) <> False Then ' Get a reference to IE's Application object Set g_objIE = CreateObject("InternetExplorer.Application") g_objIE.Offline = True 'g_objIE.Offline = False g_objIE.navigate "http://localhost/demo/public/ref" ' This loop is required to allow the IE object to finish loading... Do crt.Sleep 100 Loop While g_objIE.Busy ' Prevent the MenuBar, StatusBar, AddressBar, and Toolbar from ' being displayed as part of the IE window g_objIE.MenuBar = false g_objIE.StatusBar = false g_objIE.AddressBar = false g_objIE.Toolbar = false ' Set the initial size of the IE window g_objIE.height = 1250 g_objIE.width = 1300 g_objIE.left = 625 g_objIE.top = 0 ' Set the title of the IE window g_objIE.document.Title = "SFK" g_objIE.Visible = True ' This loop is required to allow the IE window to fully display ' before moving on Do crt.Sleep 100 Loop While g_objIE.Busy g_objIE.Document.All("ref").Value= nProcesses 'g_objIE.Document.All("ref").Focus 'crt.Screen.SendKeys "{ENTER}" ' Wait for user interaction with the dialog... crt.Sleep 200 Else crt.Screen.SendKeys "{ENTER}" End If Why the Key enter don't run ? Thank you for your help |
#2
|
|||
|
|||
Hi Nico,
If you use: crt.Screen.Send vbcr What are the results?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
SendKeys Enter
Hello,
With this line : "crt.screen.send vbcr" The Key "{ENTER}" run successfully ! Thank you very much for you Help ! |
#4
|
|||
|
|||
Hi Nico,
Great, thanks for posting an update! I am glad to hear you got it working. ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|