DarkDragon

Hotkeyset(".") doesn't function

18 posts in this topic

#1 ·  Posted

When I use Hotkeyset(".") in a script, it doesn't recognize the point, soo  doesn't do nothing. I test to use _IsPressed but in a while cycle it doesn't function corectly. Can who help me?

Share this post


Link to post
Share on other sites



#2 ·  Posted

DarkDragon,

Welcome to the AutoIt forums.

It always helps if you show us the script you have been using - see here how to do it.  Otherwise we are a bit stuck, as using the "." key as a HotKey works fine for me.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

DarkDragon,

Try this version:

$Cont = 0

; Just set HotKeys once
HotKeySet("+e", End) ; If you want a capital E then ask for Shift-e
HotKeySet(".", point_character)

While 1
    Sleep(10) ; Gives the CPU a chance to breathe
WEnd

Func point_character()

    HotKeySet(".") ; Unset the HotKey to avoid firing when sending
    Send(".")
    HotKeySet(".", point_character)
    $Cont = $Cont + 1
EndFunc   ;==>point_character

Func End()
    MsgBox(0, "How many points have you put?", "You have put: " & $Cont, 1000)
    Exit
EndFunc   ;==>End

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

Thank you for the answer but the code that you send doesn't function.:(

Share this post


Link to post
Share on other sites

#7 ·  Posted

I run the script and It doesn't work. It return 0 on the msgbox.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Only the Scite editor

Share this post


Link to post
Share on other sites

#11 ·  Posted

DarkDragon,

I tested the script running from the SciTE editor - so it looks as though you are doing something different to us. Which app has the focus when you run the script? To which app are you Sending the "." character?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

I send the "." character to Notepad and it has the focus.

Share this post


Link to post
Share on other sites

#13 ·  Posted

Again.. that works fine too.  
Are you sure you just simply run it from SciTE without running it as Admin and the same for Notepad?
What happens when you leave the focus on SciTE and type the dots?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#14 ·  Posted

Yes I'm sure. Whe I type the dots the program doesn't work because show 0 ont he msgbox

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Are you using the dot from the numeric keypad? if so change the statement to:

HotKeySet("{NUMPADDOT}", point_character)

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#16 ·  Posted

no i'm using the alphanumeric keypad

Share this post


Link to post
Share on other sites

#17 ·  Posted

Well I am out of options....  the above work fine for me, the first one with the regular dot and the last one with the numeric pad dot.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#18 ·  Posted

DarkDragon,

Try it with both HotKeySet lines:

$Cont = 0

; Just set HotKeys once
HotKeySet("+e", End) ; If you want a capital E then ask for Shift-e
HotKeySet(".", point_character)
HotKeySet("{NUMPADDOT}", point_character)

While 1
    Sleep(10) ; Gives the CPU a chance to breathe
WEnd

Func point_character()

    ConsoleWrite(@HotKeyPressed & @CRLF)
    HotKeySet(".")
    HotKeySet("{NUMPADDOT}")
    Send(".")
    HotKeySet(".", point_character)
    HotKeySet("{NUMPADDOT}", point_character)

    $Cont = $Cont + 1
EndFunc   ;==>point_character

Func End()
    MsgBox(0, "How many points have you put?", "You have put: " & $Cont, 1000)
    Exit
EndFunc   ;==>End

What do you get in the lower SciTE pane?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
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