Jump to content

Recommended Posts

Posted

I am a newer AutoIt v3 user.

I made a simple script that captures the Esc key and sends a keystroke to a MMBuilder program.

I tried it in two different PC´s and the script works fine doing what I want in both, but I heard some unwanted ding noise only in one of them, in the exactly moment the script is executed.

What am I doing wrong ?

Tanks in advance

Posted

Also, you may want to check the settings on the pc with the beep and compare it to one without the beep. There possibly is a setting that sends a beep on esc press.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Posted

here it is

;; Capture Esc, close an ONTOP running fotoshow.exe,

;; send keystroke `CTRL ALT m´to activate script of menu.mbd

HotKeySet("{ESCAPE}", "CaptureEsc")

;; wait Esc key

While 1

Sleep(200)

WEnd

Func CaptureEsc()

;; send Esc to close fotoshow.exe

HotKeySet("{ESCAPE}")

Send("{ESCAPE}")

Sleep(200)

;; activate menu.mbd window

WinActivate("menu", "")

;; send keystroke `CTRL ALT m´

Send("^!m")

Sleep(200)

Exit

EndFunc

I found out this:

running script, previous of send() command, if I touch the menu.mbd active screen area with the left button mouse, the ding disappear.

Looks like WinActivate isn`t enough (but it´s command works good, I proved it ) , That is only in one PC.

Both with the same W98SE 4.2222 spanish version

¡ I just proved it in a WXP spanish version and has the same problem !

?????????

Posted

I added some lines to script and solve my problem

It isn´t a clean solution

Someone have a different one ?.

solution

;; Capture Esc, close an ONTOP running fotoshow.exe,

;; send keystroke `CTRL ALT m´to activate script of menu.mbd

HotKeySet("{ESCAPE}", "CaptureEsc")

;; wait Esc key

While 1

Sleep(200)

WEnd

Func CaptureEsc()

;; send Esc to close fotoshow.exe

HotKeySet("{ESCAPE}")

Send("{ESCAPE}")

Sleep(200)

;; activate menu.mbd window

WinActivate("menu", "")

;; save mouse position, click on active window and return to default pos

$pos = MouseGetPos()

MouseClick ( "left", 600, 440 , 1 , 0)

MouseMove ( $pos[0], $pos[1], 0 )

;; send keystroke `CTRL ALT m´

Send("^!m")

Sleep(200)

Exit

EndFunc

Posted

Okay so the solution to your beep was using the mouse? I am not clear on why that is. :-/

Sorry I couldnt be of more use.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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
×
×
  • Create New...