help with autoit

  • From: "Nikola Stojsic \(NS studios\)" <ns.studios1@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Sun, 2 Oct 2011 00:57:20 +0200

Hello people.

I'm using autoit and I created something easy.
I have a problem, when I call a key (_isPressed function), it doesn't matter
am I in the program's window or not. And that's my problem, I've put a space
key for saying something, and when I'm in the program's window, or in the
e.g. windows explorer, it will do same thing. I've tried to put blockInput
(1) and (0) but it scrooded my keyboard.
Here's my code:

Block quote
#Include <Misc.au3>
#noTrayIcon
guicreate("milioner")
GuiSetState()
$OJfw = ObjCreate ("jfwapi")

if winActive ("milioner") then
while 1
$KeyPressed = 0
GuiSetState()
if _ispressed("1B") and $keypressed = 0 then
$keypressed = 1
exit
$KeyPressed = 0
endIf
If not _ispressed("1B") then
$KeyPressed = 0
endIf

if _ispressed("20") and $keypressed = 0 then
$keypressed = 1
$OJfw.saystring("welcome to the milioner game! Created by NS studios!", 2)
$KeyPressed = 0
endIf
If not _ispressed("20") then
$KeyPressed = 0
endIf
wend
endIf
if winActive ("milioner") == 0 then

endIf
block quote end

thanks in advance, and hope someone will help me.

Nikola Stojsic (NS studios)
e-mail: ns.studios1@xxxxxxxxx
skype: nikola.stojsic
aim: nikolastojsic
web site: http://www.nsstudios.tk


__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: