Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-07-2019, 05:33 AM
Nico Nico is offline
Registered User
 
Join Date: Feb 2019
Posts: 12
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
Reply With Quote
  #2  
Old 03-07-2019, 07:52 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,736
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
Reply With Quote
  #3  
Old 03-07-2019, 08:24 AM
Nico Nico is offline
Registered User
 
Join Date: Feb 2019
Posts: 12
SendKeys Enter

Hello,

With this line :

"crt.screen.send vbcr"

The Key "{ENTER}" run successfully ! Thank you very much for you Help !
Reply With Quote
  #4  
Old 03-07-2019, 08:49 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,736
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:41 PM.