Jump to content

Send key when minimzed window ?


_Zen
 Share

Recommended Posts

Im trying to write an auto F8 , to work in minimized YB_OnlineClient window.

So with Send() it works good when window is visible. But it does nothing when it minimized .

My code :

#include <GuiConstants.au3>

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
call("TogglePause")

While 1
    Send("{F8}")
    sleep(500)
WEnd

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
WEnd
ToolTip("zzz")
EndFunc

Func Terminate()
Exit 0
EndFunc

Please help me :whistle:

Edited by _Zen
Link to comment
Share on other sites

I edited script but it dont work ... pls help :whistle:

#include <GuiConstants.au3>

Opt("WinTitleMatchMode",4)

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
call("TogglePause")

While 1
ControlSend("YB_OnlineClient","","","{F8}", 0)
sleep(500)
WEnd

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc

i try to use :

ControlSend("YB_OnlineClient","","","{F8}", 0)

Nothing

ControlSend("YB_OnlineClient","","","{F8}", @SW_MINIMIZE)

Type {F8} on chat box

Button F8 is a key to use skill . i want to use skill ^^

Edited by _Zen
Link to comment
Share on other sites

I realize this is for a game, but I googled for the client, and don't think there was a single bit of information in english.

I suspect it's a web client or java client, and it's for a game.

Not a gamer so I'll leave it to them to help.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Thank Mr.gafrost for reply :whistle:

My EX with notepad

In notepad : Press F5 is add Time/Date

i use this code :

Run("notepad", "", @SW_MINIMIZE)
WinWait("Untitled - Notepad")
ControlFocus("Untitled - Notepad", "", "Edit1")
ControlSend("Untitled - Notepad", "","Edit1","Today is : {ENTER} xxx")

Yeah yeah , it can Enter to new line ( happy ;) )

But when i try this code :

Run("notepad", "", @SW_MINIMIZE)
WinWait("Untitled - Notepad")
ControlFocus("Untitled - Notepad", "", "Edit1")
ControlSend("Untitled - Notepad", "","Edit1","Today is : {F5} xxx")

replace {ENTER} with {F5} <<<< Can't print date time in notepad .

My problem is here . :P

Edited by _Zen
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...