Jump to content

Dialog Box that refers to a line in the script


Go to solution Solved by water,

Recommended Posts

Hi guys

I hope you can help me out with this. I don't know if it's possible, but here goes:

I am trying to create a script that will transfer calls in our phone system, to a specific phone number.

Here is a part of the script. The only important part is the line with the phone number.

Send("480")
Sleep(5000)
Send("808")
Sleep(1000)
Send("789456123") ;phone number
Sleep(1000)
Send("{#}")

What I want is:

When I start the script, a dialog box should open, saying something like: "Type in the phonenumber" and then a textfield where the person can type in a specific phone number.

So I want whatever phone number that is typed in to that textfield, to replace the Phonenumber in my above script. So once the phonenumber is typed in and the person push ENTER, the script will start from the beginning, and when it comes to that line with phone number, it will use the number that was typed in.

I hope you understand what I mean :-) Thanks!

Edited by david1337
Link to comment
Share on other sites

  • Solution

Something like this:

While 1
    $sInput = InputBox("Phone System", "Type in the phonenumber:", "", "", 200, 125)
    If @error <> 0 Then Exit
    If StringStripWS($sInput, 3) <> "" Then
        Send("480")
        Sleep(5000)
        Send("808")
        Sleep(1000)
        Send($sInput) ;phone number
        Sleep(1000)
        Send("{#}")
    EndIf
WEnd

But to make it reliable I would suggest to replace the Send statements with ControlSend.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Something like this:

While 1
    $sInput = InputBox("Phone System", "Type in the phonenumber:", "", "", 200, 125)
    If @error <> 0 Then Exit
    If StringStripWS($sInput, 3) <> "" Then
        Send("480")
        Sleep(5000)
        Send("808")
        Sleep(1000)
        Send($sInput) ;phone number
        Sleep(1000)
        Send("{#}")
    EndIf
WEnd

But to make it reliable I would suggest to replace the Send statements with ControlSend.

 

THANKS mate it worked exactly the way I wanted it to!!!!

Link to comment
Share on other sites

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...