Jump to content

Mayusc send without Shift


Joan6149
 Share

Recommended Posts

Hello, i have desktop aplication on shift+s assigned hotkey and autoit script for send text from textfile to aplication textfields, my problem is:

where my scrip sends S character with (shift+s) the app launch assigned subrutine at (shift+s) and isn't write S. How i can write S with autoit without shift+s??

 

Thanks, and sorry for my inglish

 

Link to comment
Share on other sites

Just set hotkey "ctnl+shift+s" to send the "S"

See my sample here:

_HotKey("{ESC}")    ; press ESC to exit
_HotKey("^+S")      ; press Cntl+Shift+s   to send "S" to application
_HotKey("+s")       ; press Shift+s to send hotkey shift+s to application
Func _HotKey($hotkey = "")
    ;       ! ALT  + SHIFT  ^ CONTROL  # WinKey
    Switch @HotKeyPressed
        Case "{ESC}"
            Exit 0 * MsgBox(64 + 262144, Default, "Exit", 1)
        Case "^+S"
            HotKeySet("+s")
            Send("S")
            HotKeySet("+s", "_HotKey")
        Case "+s"
            MsgBox(64+262144, Default, "Shift+s sent to application",2)
        Case Else
            If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed, 15)
            If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.", 15)
    EndSwitch
EndFunc   ;==>_HotKey

While Sleep(100)     ; here should be your application.
WEnd                 ; meanwhile, here is a dummy loop.

#cs

place cursor in next line before pressing F5 (run)

SSSS

#ce

 

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Thanks Exit,
the problem is that I have to send text with "S" whith Send() function, I enclose the following code to explain it:

or $content In $todos

;~  ConsoleWrite($content & @LF)
    sleep(500)
    if $first == true Then
        $first = false
        ContinueLoop
    EndIf

    if($desc == false) Then
        Send($content)
        Send("{ENTER}")
        $desc = true
        sleep(500)

    Else
        MouseClick($MOUSE_CLICK_LEFT, 47, 44, 1)
        $denominacion = "$$" & $content
;~      Send({CAPSLOCK})
;~      Send("{CAPSLOCK on}")
;~      Send("$$" & $content)
        ConsoleWrite($denominacion & @LF)
        Send($denominacion,0)
        MouseClick($MOUSE_CLICK_LEFT, 89, 42, 1)
        sleep(500)
        WinWait("[CLASS:ThunderRT6FormDC]", "", 10)
        $desc = false

    EndIf
Next

$content It is capitalized text, obtained from a list of a txt file. This text includes the "S" which is the letter you do not write.


How could I fix it?
Thank you very much!

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