Questions tagged [systemevent]
48 questions
2
votes
2 answers
Emulate / send Modifier Key (Cntrl, Alt, fn, Shift) in OSx
I am sending keyboard key press and key release events, which works for all keyboard keys.
But modifier keys works only when the key associated with modifier key is sent from application, and not from real hardware. That is if I send
Shift and 'a'…

matt007
- 304
- 3
- 16
2
votes
2 answers
AppleScript - determine the network service to which the current IP address is bound
The following AppleScript code will return all the network services in the Network Setup.
tell application "System Events"
tell current location of network preferences
set names to get name of every service
end tell
end…

Codename K
- 890
- 4
- 23
- 52
2
votes
0 answers
Subscribing to system events in C# with P/Invoke in Mono
I have an application in which I need to respond to events such as a user change in the system time (like the Microsoft.Win32.SystemEvents.TimeChanged event), the changing of display settings (SystemEvents.DisplaySettingsChanging and…

Lars
- 145
- 2
- 5
2
votes
1 answer
Sleep(suspend) and Resuming windows form starts program on worker thread instead of main thread
The windows form I am working on subscribes to Microsoft.Win32.SystemEvents.PowerModeChanged and on Suspend it runs the Close() method on the form. On Resume it runs the Run() function like it would on initial load. The problem is that when the…

madeFromCode
- 721
- 7
- 15
1
vote
2 answers
When should i unregister system events to prevent memoryleaks?
I am using systemevents like this:
SystemEvents.SessionEnding += SystemEventsSessionEnding;
to detect when user shutsdown or log off, but i have read that i need to unregister this event to prevent memoryleaks and such.
When/Where…

syncis
- 1,395
- 4
- 25
- 43
1
vote
0 answers
Why key code 126 using {control down} not working by apple script on mac OSX 10.12.1 while it is working on OSX 10.12.3?
tell application "System Events"
key code 126 using {control down}
end tell
The above apple script is working for OSX 10.12.3 but not for OSX 10.12.1, Key code 126 for "Up" and "control with up" is shortcut for the mission control on osx.…

Ruchika Jain
- 31
- 2
1
vote
1 answer
Power Plan Changing Event beetwen High Performance, Power Saver and Balanced
I'm trying to figure out, how to get Event of Power Plan Changing between High Performance, Power Saver and Balanced, I need it to change my app with different mode for each plan. I found some solutions on this direction, but does not get desired…
user7033723
1
vote
1 answer
"An error occurred opening snapshot" Process Monitor
Each time I run a new instance of the Process Monitor, a dialog box pops up stating that "An error occurred opening snapshot", this error prevents the capturing of any events.
Pressing the capture button or Ctrl+E reproduces the error message as…

Merav Kochavi
- 4,223
- 2
- 32
- 37
1
vote
1 answer
Is keeping the key pressed equal to pressing the key many times quickly
I'm not sure if this is the right place to ask this question. It's not an application specific question nor it is about any concrete problem. However, to make it more application specific, I'll take the example of Photoshop.
The shortcut to reduce…

Chirantan
- 15,304
- 8
- 49
- 75
1
vote
1 answer
How to capture Logoff event using a windows service in C#?
I am trying to create a service that will log when users logon and logoff. I have no problem with capturing the logon, but for some reason i cannot catch the logoff event. this is the code i have used:
protected override void OnStart(string[]…
user279500
1
vote
1 answer
What does it mean to "register system events... with Oracle Internet Directory"?
This is from the Stream - AQ docs.
You can register system events, user events, and notifications on queues with Oracle Internet Directory. System events are database startup, database shutdown, and system error events. User events include user log…
Mark Brady
1
vote
2 answers
Mocking system events using MOQ
Is there a way to mock system events in C# such as SystemEvents.PowerModeChanged and artificially raise them in a MOQ setup?

TheWolf
- 1,675
- 4
- 22
- 34
1
vote
1 answer
How get system start up event in windows service c#?
I am writing a windows service. I want to do some functions on system start up, system lock, shutdown. How to get the start up,lock and shutdown events in the windows service ?

Arun
- 3,478
- 8
- 33
- 46
0
votes
1 answer
Titanium: register to system events
I'm looking for a way to create custom events on Titanium.
In order to do that I would need to register to a global var array every time the window opens (not a problem) however, I would have to un-register every time the window is cleaned from the…

thepoosh
- 12,497
- 15
- 73
- 132
0
votes
1 answer
Applescript - Looping through System Events is killing my Mac
I have a massive spreadsheet with a titanic number of rows/columns (e.g. ~250 columns, many thousands of rows) that I'm trying to convert into PDFs by looping through each row with AppleScript, copying that row's ~250 variables to TextEdit set to…

Damien X
- 41
- 3