Jump to content

How can I insert "numpad 5" but without numpad ON that means "clear KEY"


Recommended Posts

Welcome to AutoIt and the forum!

Maybe helps.

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

  • Moderators

Could always roll your own, maybe something like:

Global $gs_AppWindowTitle = "MyApplicationWindowTitle"
Global $gh_Hwnd = WinGetHandle($gs_AppWindowTitle)
Global $gf_PostMessage = _PostKeyDownMessage($gh_Hwnd, 0x0C)

MsgBox(64 + 262144, "Info", "Posted KeyDown 0C = " & ($gf_PostMessage = 1))

Func _PostKeyDownMessage($h_wnd, $i_key)
    ; wm_keydown = 0x0100

    If Not StringIsDigit($i_key) Then
        If Not StringRegExp($i_key, '^0x|X') Then Return SetError(-1, 0, 0)
        $i_key = Number($i_key)
    EndIf

    Local $a_pm = DllCall('user32.dll', 'int', 'PostMessage', _
        'hwnd', $h_wnd, 'uint', 0x0100, 'wparam', $i_key, 'lparam', 0)
    If @error Then Return SetError(@error, @extended, False)

    Return SetError(($a_pm[0] = 0), 0, ($a_pm[0] > 0))
EndFunc

Edit:

Had 0xC0 and not 0x0C ... oops, sorry :( .

I was testing other key codes: http://msdn.microsoft.com/en-us/library/dd375731%28v=vs.85%29.aspx and lost track of the original intent lol.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

HERE IS WHAT I'm DOING

WinActivate("Calypso - Избор на маса")

WinWaitActive("Calypso - Избор на маса")

send("9999")

Send('{enter}')

WinWaitActive("Calypso")

send('9 {enter}')

send("{f10}")

WinWaitActive('Приключване на сметка')

send("{numlock on}")

send("{numpadadd}")

send("{numpad2}")

;here i need numpad 5 but with numpad turned off

sleep(250)

send("{numpad5}")

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