×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Expanding my knowledge and would like some help

Expanding my knowledge and would like some help

Expanding my knowledge and would like some help

(OP)
I now feel like I can do rather well with sending commands/keys with AttachMate and would like to try something a little harder. This would involve two things I have never done before, A Dialog Box and commanding Internet Explorer.

I would like to create a dialog box has the following choices:

  • Refresh every:
  • 1 Minute
  • 2 Minute
  • 3 Minute
  • 4 Minute
  • 5 Minute
  • Start
  • Then on a second screen: Stop
Each minute interval would send the CRTL-R key in a loop until the stop button was pressed. This CRTL-R would refresh a bucket within internet explorer.

How do I start? I want to truly know how to create and manipulate these things, so I would rather not have it written for me.

RE: Expanding my knowledge and would like some help

(OP)
UPDATE

I used the dialog editor to design a dialog box, however now I don't know what to do with it. Also all of the OptionButtons have the "Invaliad OptionButton Control" error. Is this because they are not attached to anything yet?

CODE -->

Begin Dialog newdlg 186, 92
   OptionGroup .OptionGroup1
      OptionButton  20, 20, 50, 20, "1 Minute", .1MinuteButton
      OptionButton  70, 20, 50, 20, "2 Minutes", .2MinuteButton
      OptionButton  20, 40, 50, 20, "3 Minutes", .3MinuteButton
      OptionButton  70, 40, 50, 20, "4 Minutes", .4MinuteButton
      OptionButton  20, 60, 50, 20, "5 Minutes", .5MinuteButton
   Text  41, 6, 61, 15, "Refresh every:"
   PushButton  125, 18, 50, 20, "Start"
   PushButton  125, 40, 50, 20, "Pause"
   PushButton  125, 64, 50, 20, "Stop"
End Dialog 

RE: Expanding my knowledge and would like some help

(OP)
UPDATE 2

This is where I'm at now. Bold lines are where I'm getting Syntax Errors, Invalid OptionButton Control Errors, and Illegal Statements. Underlined lines are incomplete right now.


CODE -->

' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$

Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
	Dim Sessions As Object
	Dim System As Object
	Set System = CreateObject("EXTRA.System")	' Gets the system object
	If (System is Nothing) Then
		Msgbox "Could not create the EXTRA System object.  Stopping macro playback."
		STOP
	End If
	Set Sessions = System.Sessions

	If (Sessions is Nothing) Then
		Msgbox "Could not create the Sessions collection object.  Stopping macro playback."
		STOP
	End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
	g_HostSettleTime = 300		' milliseconds

	OldSystemTimeout& = System.TimeoutValue
	If (g_HostSettleTime > OldSystemTimeout) Then
		System.TimeoutValue = g_HostSettleTime
	End If

' Get the necessary Session Object
	Dim Sess0 As Object
	Set Sess0 = System.ActiveSession
	If (Sess0 is Nothing) Then
		Msgbox "Could not create the Session object.  Stopping macro playback."
		STOP
	End If
	If Not Sess0.Visible Then Sess0.Visible = TRUE
	Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
	
 

  Dim IE as object
  Set objIE = CreateObject("InternetExplorer.Application")
  .Visible = True
  .Navigate "https://etms.verizon.com/ticketing/"

 
 
 
' Code starts below here!   

Begin Dialog newdlg 186, 92
   OptionGroup .OptionGroup1
      OptionButton  20, 20, 50, 20, "1 Minute", .1MinuteButton
      OptionButton  70, 20, 50, 20, "2 Minutes", .2MinuteButton
      OptionButton  20, 40, 50, 20, "3 Minutes", .3MinuteButton
      OptionButton  70, 40, 50, 20, "4 Minutes", .4MinuteButton
      OptionButton  20, 60, 50, 20, "5 Minutes", .5MinuteButton
   Text  41, 6, 61, 15, "Refresh every:"
   PushButton  125, 18, 50, 20, "Start"
   PushButton  125, 40, 50, 20, "Pause"
   PushButton  125, 64, 50, 20, "Stop"
End Dialog

    
    
    
Do Until Sess0.Screen.Sendkeys("CTRL+R")
    Application.Wait (Now + TimeValue("0:01:00"))
Loop
    
Do Until Sess0.Screen.Sendkeys("CTRL+R")
    Application.Wait (Now + TimeValue("0:02:00"))
Loop

Do Until Sess0.Screen.Sendkeys("CTRL+R")
    Application.Wait (Now + TimeValue("0:03:00"))
Loop

Do Until Sess0.Screen.Sendkeys("CTRL+R")
    Application.Wait (Now + TimeValue("0:04:00"))
Loop

Do Until Sess0.Screen.Sendkeys("CTRL+R")
    Application.Wait (Now + TimeValue("0:05:00"))
Loop
    
	System.TimeoutValue = OldSystemTimeout    
End Sub 

RE: Expanding my knowledge and would like some help

Public rather than Global

CODE

'
  Dim IE as object
  Set objIE = CreateObject("InternetExplorer.Application")
  With objIE
     .Visible = True
     .Navigate "https://etms.verizon.com/ticketing/"
  End With 

RE: Expanding my knowledge and would like some help

(OP)
Skip, I not get the error "objIE" is not a record type. Any clue on that?

RE: Expanding my knowledge and would like some help

you now get an error? On what statement?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close