View Single Post
  #12 (permalink)  
Old 05-30-2007, 03:40 AM
conf conf is offline
Knows the basics
 
Join Date: May 2007
Posts: 82
Default

Another problem:

I run the example of Hardware lib"

Code:
'Add a Hardware object named Hardware1
Sub Globals


End Sub


Sub App_Start
      Form1.show
      Hardware1.New1
      msgbox("Device ID: " & Hardware1.GetDeviceID)
      Hardware1.BackLightOn 'Prevents the back light from suspending
      Hardware1.RunAppAtEvent(AppPath & "\MyApp.exe", Hardware1.evWakeup) 'MyApp will be launched each time the device is turned on
      Hardware1.RunAppAtTime (AppPath & "\MyApp.exe", TimeAdd(now,0,5,0)) 'MyApp will be launched in 5 minutes
      AddTimer("Timer1")
      Timer1.Interval = 5000 '5 seconds
      Timer1.Enabled = true
      TextBox1.Focus
      Hardware1.KeyPress(asc("1")) 'Writes 1
      
      Hardware1.KeyDown(160) 'Holds the left shift down
      Hardware1.KeyPress(asc("1")) 'Writes !
      Hardware1.KeyUp(160) 'Frees the left shift
End Sub


Sub Timer1_Tick
      Hardware1.KeepAlive 'Resets the system idle timers
End Sub
and now when I wake up the device, it's always run MyApp.exe. How to stop it ? I soft-reset but it's not work.
Reply With Quote