Source language: Translate to:

Interrogating open processes in Windows

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Interrogating open processes in Windows

Postby samfourie » Wed Jul 17, 2013 1:43 pm

Is there a way that i can, if i know what the id and or name of an application, is determine if this app is (1) open in windows and (2) if the app is in the foreground or the background.. in other words is the app open but behind a window or is the app open but currently being used!

I have the need to create such an app as it is always a mission to record what i am doing and with what programs i am working ! Then i can let this app record the application statuses in 15/30/60 seconds loops and write the data time and time open to a database file for me so that i can bill my clients according !

I ask your advice as I have not a clue where to start! and can Neobook do this... with or without scripting from visual basic ?

Thank you Kindly !
samfourie
 
Posts: 3
Joined: Mon Apr 12, 2010 6:54 am

Re: Interrogating open processes in Windows

Postby HPW » Thu Jul 18, 2013 12:28 am

Do you mean to check this from inside this one own app?

Then you might look at global vars from the doc:

[WindowState] The display state of the publication window (Normal, Minimized or Maximized).
[WindowOrder] The publication window’s order as set in Book Properties (Normal, OnTop or OnBottom).

Also the idle event might interesting.

hpwAutoItIfWinActive from hpwAutoIt might also help.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Interrogating open processes in Windows

Postby samfourie » Thu Jul 18, 2013 1:18 am

Hans. thank you no.. i need to check other applications open in Windows.

i use notepad++ frontpage, adobe fireworks, and a few other small apps including chromes opera firefox maxthon and safari internet browsers.

i want to write a neobook app that checks the state of these apps and record it !
samfourie
 
Posts: 3
Joined: Mon Apr 12, 2010 6:54 am

Re: Interrogating open processes in Windows

Postby Cipolla » Thu Jul 18, 2013 1:32 am

Samfourie,

sometimes HPW understates a little bit. He is absolutely right. Neobook and the plugin hpwAutoIt dos the whole job. You can download a copy on his website

http://www.hpwsoft.de/

Take a look at the action inside the demo pub

Code: Select all
hpwAutoItWinGetActiveTitle


Simply put this action inside a timerobject with some other code to put the results and timestamp i.e. in an database and your pub will log all active Applications.
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron