Jump to content

Send Uppercase from input


Recommended Posts

Hello I would like to create a tool which can send a custom text in big letters.  My problem is that the tool don´t  write the letters big.

Here is my code:

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


Local $sString, $name
$window = GUICreate("Texttransformer v1.0", 283, 229, 446, 332)
GUISetCursor (0)
GUISetBkColor(0x008080)
$exit = GUICtrlCreateLabel("F9 - exit", 80, 144, 124, 28)
GUICtrlSetFont(-1, 22, 400, 0, "Terminal")
$start = GUICtrlCreateLabel("F5 - start", 80, 96, 124, 28)
GUICtrlSetFont(-1, 22, 400, 0, "Terminal")
$title = GUICtrlCreateLabel("Texttransformer", 8, 32, 264, 29)
GUICtrlSetFont(-1, 19, 400, 0, "MingLiU_HKSCS-ExtB")
GUICtrlSetColor(-1, 0xC0DCC0)
$name = GUICtrlCreateInput("", 64, 184, 153, 21)
GUICtrlSetColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)


HotKeySet ("{f5}","Start")
HotKeySet ("{f9}","Cancle")


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func Start();
    Local $sString = GUICtrlRead($name)
    StringUpper($sString) 
    Send($sString)
EndFunc


Func Cancle();
    Exit
EndFunc

Link to comment
Share on other sites

Should be:

8 minutes ago, P3rsp3ctiv3 said:

Func Start();
    Local $sString = GUICtrlRead($name)
    GUICtrlSetData($name, StringUpper($sString) )
EndFunc

 

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

You are quoting the wrong text :) That's not what I said.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Where is your "Send" command to go? You do not set any window to be activated so the output goes to your $window form but there is no field on @window set to handle the Send command. Perhaps you need to activate the terminal window before using the Send command?

Who lied and told you life would EVER be fair?

Link to comment
Share on other sites

40 minutes ago, benched42 said:

Where is your "Send" command to go? You do not set any window to be activated so the output goes to your $window form but there is no field on @window set to handle the Send command. Perhaps you need to activate the terminal window before using the Send command?

If i run the script a window will open. If I press F5, the function Start will be activated and send the uppercase into the current window.

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...