KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Request for new feature:GetLastInputInfo

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Wed May 05, 2004 2:44 pm    Post subject: Request for new feature:GetLastInputInfo Reply with quote

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference/KeyboardInputFunctions/GetLastInputInfo.asp

Shawn, think you could be kind enough to expose this API from inside KiXforms?

Bryce
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed May 05, 2004 5:34 pm    Post subject: Reply with quote

hmmm, should be no problem ... the biggest question I have to ask (myself) is where this would "fit in" - in the KF object model ... bu ja, this api could be quite usefull ...
Back to top
View user's profile Send private message
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Wed May 05, 2004 9:10 pm    Post subject: Reply with quote

Code:

$LastInputInfo = $System.GetLastInputInfo
If $LastInputInfo > 1000 * 60 * 5 ; 5 minutes.
   ; The user must be sleeping, lets close the form.
   $Form.Hide
EndIf
Back to top
View user's profile Send private message MSN Messenger
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Wed May 05, 2004 9:13 pm    Post subject: Reply with quote

Just had a thought, you could put it in Form as well. Then you could...

Code:

$FormLastInputInfo = $Form.GetLastInputInfo
If $FormLastInputInfo > 1000 * 60 * 5 ; 5 minutes.
   ; The user might be sleeping, lets see...
   If $System.GetLastInputInfo > 1000 * 60 * 5
      $Form.Hide
   Else
      ; No, he just isn't using my neato Form. :-(
   EndIf
EndIf
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 08, 2004 5:34 pm    Post subject: Reply with quote

?"LastUserInput=" $System.Environment.LastUserInput

-Shawn ;=)
Back to top
View user's profile Send private message
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Thu May 20, 2004 2:32 pm    Post subject: Reply with quote

Shawn,

Is this in and working on Kixforms 2.3.0.45?

I ran this

Code:

$System = CreateObject("Kixtart.System")
? $system.version
?"LastUserInput=" $System.Environment.LastUserInput


and got

Code:

2.3.0.45
LastUserInput=


Bryce
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu May 20, 2004 3:20 pm    Post subject: Reply with quote

Bryce ... cripes sorry - I had to temporarily disable this feature in the latest development build. This feature is availble in windows 2000+ only ... I found that when I enabled this feature - it broke the registration of kixforms on windows 9x (lol) ... I fully intend to re-enable this feature very soon ... sorry for the boo-boo.
Back to top
View user's profile Send private message
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Thu May 20, 2004 3:42 pm    Post subject: Reply with quote

Ahh ok, so i am not going nuts!

This brings up a question.... at what time does one stop supporting win9x?
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu May 20, 2004 3:51 pm    Post subject: Reply with quote

when shawn says so?
glad to see you shawn doing this afterall...

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Fri Jul 16, 2004 4:58 pm    Post subject: Reply with quote

Shawn, this ever make it back in? just tried the 45 build and had nothing...
Back to top
View user's profile Send private message
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Fri Jul 16, 2004 6:29 pm    Post subject: Reply with quote

oops ignore me.... i am being dence today Razz
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Jul 16, 2004 11:10 pm    Post subject: Reply with quote

Bryce, re: LastUserInput - I just uploaded a new dev. build. Can you give a try and please advise ?
Back to top
View user's profile Send private message
Bryce
KiXforms Supporter
KiXforms Supporter


Joined: 26 Mar 2003
Posts: 69

PostPosted: Sat Jul 17, 2004 8:19 am    Post subject: Reply with quote

OH YEAH!!

Win2k system runs OK!

Code:

break on
$System = CreateObject("Kixtart.System")

while not @error
   $tick = $System.Environment.LastUserInput
   $lastinput = val(left(@ticks,-3)) - val(left($tick,-3))
   ? $lastinput
   sleep 1
loop


Very Happy Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group