code to turn caps lock off and log out/off of MAC OSX
Posted: Tue Oct 20, 2015 11:13 pm
Hi
This is my first post on the forums and have yet to write my first useful code.
I have purebasic installed on mac osx snow leopard.
I always like to write small utilities when learning a new compiler.
I have issues logging into mac osx from a vnc client when the caps lock is on.
The vnc client software will not turn off the caps lock at the mac osx login screen and all the passwords we are using are in lowercase.
Our computers are rarely booted, the computers are usually logged in by some user and then logged out/off only.
I do a lot of technical support and usually by remote control software with a windows computer.
What I feel will help and be a good first program is to have an application on the apple desktop where the user can log off from.
I found some code the forums but not thing that exactly fits.
The code main code that I would be needing help to is
1. check the state of the caps lock and turn it off if is on.
2. run code to some how to log out.
I will have to be running a gui so that i can ask the user if that is what they really want to do.
I really do not like the mac os x way of logging off anyways, because there should be a way for user to abort a logoff.
I do think I can write the code to confirm that the user wants to logoff.
But the caps lock state is where i am having trouble with first.
I am not sure the best way to logoff as i have not researched that yet, either by some shell command or direct api.
Thank you for any help or pointers.
I look forward to contributing code to the forum and being a good member.
Paul
This is my first post on the forums and have yet to write my first useful code.
I have purebasic installed on mac osx snow leopard.
I always like to write small utilities when learning a new compiler.
I have issues logging into mac osx from a vnc client when the caps lock is on.
The vnc client software will not turn off the caps lock at the mac osx login screen and all the passwords we are using are in lowercase.
Our computers are rarely booted, the computers are usually logged in by some user and then logged out/off only.
I do a lot of technical support and usually by remote control software with a windows computer.
What I feel will help and be a good first program is to have an application on the apple desktop where the user can log off from.
I found some code the forums but not thing that exactly fits.
The code main code that I would be needing help to is
1. check the state of the caps lock and turn it off if is on.
2. run code to some how to log out.
I will have to be running a gui so that i can ask the user if that is what they really want to do.
I really do not like the mac os x way of logging off anyways, because there should be a way for user to abort a logoff.
I do think I can write the code to confirm that the user wants to logoff.
But the caps lock state is where i am having trouble with first.
I am not sure the best way to logoff as i have not researched that yet, either by some shell command or direct api.
Thank you for any help or pointers.
I look forward to contributing code to the forum and being a good member.
Paul