Jump to content

trying to use IsPressed_UDF.au3 with a function key


Recommended Posts

I've written a script that sends a '1' then '2' then '3' then '4' then 'Esc' each time a key is triggered

my script is working with the key combination of Ctrl 8 to trigger it

I want to use the function key "F9" instead but I don't get what I'm doing wrong

#include<IsPressed_UDF.au3>

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 50)

$x = 0

While 1
;If _IsPressed("011") And _IsPressed("038") Then ; <---- working
If _IsFuncKeyPressed() Then ; <---- blank right now i know. have tried every combination I can think of
If $x = 4 Then
Send("{Esc}")
$x = 0
Else
$x = $x + 1
Send ( $x )
EndIf
EndIf
Wend
Link to comment
Share on other sites

Edit: never mind, I figured this part out, my logitech mouse was sending the control, not my script, but still need a little help with the function key :(

after posting I ran into the control key getting stuck down. first I took the Ctrl key completely out, is not needed. was still getting stuck so I searched and found this:

ControlSend("", "", "", "text", 0)

it doesn't work perfectly tho... works sometimes, not every time...

Edited by 00pontiac
Link to comment
Share on other sites

I'm saying that I've given up any hope of getting any help here, I'm a "noob" experienced users have better things to do. that attitude is abundantly clear from reading this help section.

sorry, just discouraged... warn me ban me berate me whatever... just lost interest i guess.

Link to comment
Share on other sites

00pontiac,

It is unfortunate that you feel that way. My impression is that your previous threads were responded to adequately. This is a volunteer resource and as such you may have some delay in getting an answer. Have some patience and use the lag time for other tasks.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

  • Moderators

00pontiac,

I've given up any hope of getting any help here,, I'm a "noob" experienced users have better things to do. that attitude is abundantly clear from reading this help section

I get really quite annoyed whenever I read this sort of whining excuse. I (and plenty of other members) help anyone we can, regardless of their experience level, but we cannot be everywhere - nor do we have the time or interest to read every single thread. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You have to wait until someone who knows something about your particular problem, and is willing to help, comes online.

In this case, why have you not posted in the IsPressed UDF thread itself? Most of us use the built-in _IsPressed command - do you expect us to install and play with a new UDF just to help you?

And why on earth should you be banned? Berated like this for acting as you have done, certainly, but you are quite at liberty to state your opinion - just do not expect us to agree. ;)

M23

Edit: Changed wording to be less "me"-centred - because I know lots of others help out too. :)

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

This works perfectly for me using the native _IsPressed command - does it for you? :)

#include <Misc.au3>

HotKeySet("{ESC}", "On_Exit")

Local $hDLL = DllOpen("user32.dll")

While 1

    If _IsPressed("78", $hDLL) = 1 Then

        For $i = 1 To 3
            Send($i)
        Next
        Send("{ESC}")

        While _IsPressed("78", $hDLL)
            Sleep(10)
        WEnd

    EndIf

    Sleep(10)

WEnd

Func On_Exit()
    ConsoleWrite("ESC pressed!" & @CRLF)
    DllClose($hDLL)
    Exit
EndFunc

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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