Jump to content

now i want to know Hotkeyset Functions !!


Go to solution Solved by Melba23,

Recommended Posts

  • Moderators

yousefsamy,

Please post the code you are using and the content of the SciTE console. :)

M23

P.S. See here how to do it. ;)

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

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ScreenCapture.au3>

$Form1 = GUICreate("Form1", 468, 293, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 48, 32, 369, 209)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            HotKeySet("c","ScreenCapture")
            _ScreenCapture_Capture( @DesktopDir & "\11.jpg")
            ShellExecute (@DesktopDir & "\11.jpg")


    EndSwitch
WEnd

i think u forgot me -   :ermm:  :geek:

----

oh i solved it -_-

$k = _ScreenCapture_Capture( @DesktopDir & "11.jpg")
hotkeyset( " {Enter} " , $k )

Edited by yousefsamy
Link to comment
Share on other sites

  • Moderators

yousefsamy,

You get the error because there is no ScreenCapture function to run when you set the HotKey. What are you expecting the HotKey to do? :huh:

M23

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

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ScreenCapture.au3>



$Form1 = GUICreate("Form1", 468, 293, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 48, 32, 369, 209)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $k = _ScreenCapture_Capture( @DesktopDir & "\11.jpg")
            HotKeySet("d" , $k ) ;<== Not Run with this key [ d ] ?? why !!

            ShellExecute (@DesktopDir & "\11.jpg")


    EndSwitch
WEnd

but how can i make the hotkey  like only {s} i cant do it ??

Edited by yousefsamy
Link to comment
Share on other sites

  • Moderators
  • Solution

yousefsamy,

Do you want the HotKey to act in the same way as the button and take a screenshot? :huh:

If so you can do it like this:

#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>

; Run the function when you press the HotKey
HotKeySet("d", "_ScreenShot")

$Form1 = GUICreate("Form1", 468, 293, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 48, 32, 369, 209)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            ; Run the function when you press the button
            _ScreenShot()
    EndSwitch
WEnd

Func _Screenshot()
    ; Take and dispaly the screenshot
    _ScreenCapture_Capture(@DesktopDir & "\11.jpg")
    ShellExecute (@DesktopDir & "\11.jpg")
EndFunc
All clear? :)

M23

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

yousefsamy,

Do you want the HotKey to act in the same way as the button and take a screenshot? :huh:

If so you can do it like this:

#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>

; Run the function when you press the HotKey
HotKeySet("d", "_ScreenShot")

$Form1 = GUICreate("Form1", 468, 293, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 48, 32, 369, 209)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            ; Run the function when you press the button
            _ScreenShot()
    EndSwitch
WEnd

Func _Screenshot()
    ; Take and dispaly the screenshot
    _ScreenCapture_Capture(@DesktopDir & "\11.jpg")
    ShellExecute (@DesktopDir & "\11.jpg")
EndFunc
All clear? :)

M23

 

:thumbsup:  Cant describe you with words ... :sweating: Thanx

should i learn Func codes ??

Edited by yousefsamy
Link to comment
Share on other sites

I think the Language Reference - User Functions section in the Help file could explain it better than I could.

http://www.autoitscript.com/autoit3/docs/intro/lang_functions.htm

Kudos to you for wanting to learn more about AutoIt!

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

I'm not sure really. Since this is turning into an offshoot of your original post, I guess just keep it here, especially if this new question is related to the script you had a problem with previously. A moderator, probably Melba23, who helped you earlier, can make a better decision on that. In fact, I'm just a regular user here, and my decisions don't count, so I wouldn't even try to make one. :)

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

I'm not sure really. Since this is turning into an offshoot of your original post, I guess just keep it here, especially if this new question is related to the script you had a problem with previously. A moderator, probably Melba23, who helped you earlier, can make a better decision on that. In fact, I'm just a regular user here, and my decisions don't count. :)

oh no my dear you can help and you are a good one ^_^ i will make a new topic with my problem ok and i am waiting ur reply 

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