0
How to run a program on access?
Started by weirdwolf, Nov 27 2016 01:15 AM
10 replies to this topic
#1
Posted 27 November 2016 - 01:15 AM
Alright, straight to the problem at hand.
I have made myself a password program (protected from Ctrl+T) that i would like to run on access to the computer, say you have a password protected door using a monitor on the side of the computer with a numpad lock, but anyone can right click the computer and change the password to said numpad (i like configurability) is there a way to make my password program run, as soon as the computer itself gets accessed?
I have made myself a password program (protected from Ctrl+T) that i would like to run on access to the computer, say you have a password protected door using a monitor on the side of the computer with a numpad lock, but anyone can right click the computer and change the password to said numpad (i like configurability) is there a way to make my password program run, as soon as the computer itself gets accessed?
#3
Posted 27 November 2016 - 01:36 PM
Not quite what i was gunning for, what i'd like is for, when the computer is running a program already, when you then access the computer a password program will run, then if you get the correct password it'll go back to running the other program, and to make sure the first program is 'always' running, it would look for input, and if nothing has been written for a couple of seconds it would terminate and go back to the first program, so a loop of the two programs if you will
#4
Posted 28 November 2016 - 12:10 AM
The computer can't tell if a user is sitting in front of it or not.
Is there any particular need to only run one program at a time? It sounds like you could just run your two scripts in different multishell tabs... assuming you couldn't just code all functionality into one script.
Is there any particular need to only run one program at a time? It sounds like you could just run your two scripts in different multishell tabs... assuming you couldn't just code all functionality into one script.
#5
Posted 28 November 2016 - 03:44 PM
there isn't a way to check if a player has clicked the computer? like checking where on a monitor a player has right-clicked?
#6
Posted 28 November 2016 - 09:07 PM
weirdwolf, on 28 November 2016 - 03:44 PM, said:
there isn't a way to check if a player has clicked the computer? like checking where on a monitor a player has right-clicked?
Sure, it's possible to get mouse events, but they won't tell the program if a player interacted with the computer or not.
#7
Posted 28 November 2016 - 10:19 PM
First, make coroutine manager, or find one online. Also make a timer var On the coroutine manager run your program and rom/programs/shell. Next, create a whitelist with user-events.
Now, rig os.pullEventRaw to check against that list, and if it finds a match, then reset the timerVar. But do this after also rigging it to check timerVar, and if timer var is greater than 180000 than go back to the login screen.
Now, rig os.pullEventRaw to check against that list, and if it finds a match, then reset the timerVar. But do this after also rigging it to check timerVar, and if timer var is greater than 180000 than go back to the login screen.
Edited by EveryOS, 28 November 2016 - 10:22 PM.
#9
Posted 29 November 2016 - 11:39 AM
KingofGamesYami, on 28 November 2016 - 10:24 PM, said:
Might have been useful to have a link: http://www.computerc.../Parallel_(API)
#10
Posted 02 December 2016 - 02:35 AM
Lupus590, on 29 November 2016 - 11:39 AM, said:
KingofGamesYami, on 28 November 2016 - 10:24 PM, said:
Might have been useful to have a link: http://www.computerc.../Parallel_(API)
I swear, 90% of the time someone says to make a custom coroutine manager, the built in API is adequate and as mentioned - will work properly.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users