Sign in to follow this  
Followers 0
friends

Can HotKeySet works with Run() ?

4 posts in this topic

I wonder if the HotKeySet can work with Run() @ComSpec command ?

I've tested it out... but looks like it doesn't work...

anybody, any idea on this ?

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

HotKeySet ("{F9}", "GetHelp")

$flag = 1

WHILE $flag = 1  ; keep it active until condition meets
         ; other statements here
WEND

Func GetHelp()
     Run (@ComSpec & " /c " & "net send sppmis2 Help is required by this counter. Please Check the counter / contact the Cashier immediately !", "", @SW_HIDE)        
     
EndFunc

When I press F9 key, the Run() command does not work, any problem with

this coding ? Please help and thanks

Edited by friends

Share this post


Link to post
Share on other sites

change to this to debug... I think the slash in your message is a bad idea...

HotKeySet ("{F9}", "GetHelp")

$flag = 1

WHILE $flag = 1; keep it active until condition meets
      ; other statements here
WEND

Func GetHelp()
    Run (@ComSpec & " /k " & "net send localhost Help is required by this counter. Please Check the counter / contact the Cashier immediately !")        
    
EndFunc

<{POST_SNAPBACK}>

Thanks Larry... I'll try it out !

by the way.... what is the different between " /c " and " /k " ?

cos in the AutoIT Help file... it does not clearly stated what is those

parameters for.

Another question is, is there any other way to send a message to PC rather

than using the Run() with @ComSpec command ?

Thanks

Share this post


Link to post
Share on other sites

/k is a parameter to comspec and not related to autoit.

I use net send as...

RunWait('net send computername "My Message"','',@SW_HIDE)

<{POST_SNAPBACK}>

thanks for the tips.. i'll try it out ! :ph34r:

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
Sign in to follow this  
Followers 0