pbecks1963 Posted February 20, 2010 Posted February 20, 2010 Hello Y'all, I am new to autoit. I am looking for a way to lock the input from the mouse/keyboard on multiple pc's (on which AutoIt is NOT installed!) I am correct in the assumption that a AutoIt-script can do this AND that this script can be changed into a executable that can run WITHOUT Autoit? If so, can someone point me to a sample script that can do this? If so, how do i change the script into a executable? (i did a preliminairy search in this forum but i am not sure) Thanks for your reply!
Necromorph Posted February 20, 2010 Posted February 20, 2010 (edited) well, i'm also new to autoit, but you can compile the script to an .exe but just right clicking on the .au3 script and selecting "convert to .exe", but as far as making the user interface void, im not sure, and sort of interesed myself as to how to do this. you can also compile scripts from the start menu. start>autoit>compile script. you can add your own custom .ico to this as well. have fun.!! feed on blood! Edited February 20, 2010 by redLabel
pbecks1963 Posted February 20, 2010 Author Posted February 20, 2010 Thnx for the tip! By the way, what i am trying to make is the following: Display a full screen jpg and make it impossible for people to use the keyboard/mouse to go back to the desktop/applications that they were running. (and then after 10 minutes i want to auto lock the pc and stop this script from running) Right now i am doing all this with a vbs script and the help off a appl. called: "kidkeylock" (but i would rather programme it all myself)
Moderators Melba23 Posted February 20, 2010 Moderators Posted February 20, 2010 pbecks1963,Display a full screen jpg and make it impossible for people to use the keyboard/mouse to go back to the desktop/applications that they were running. (and then after 10 minutes i want to auto lock the pc and stop this script from running)I am sure you will understand if, before offering any help, I ask why you want to do this? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dani Posted February 20, 2010 Posted February 20, 2010 Autoit can block input with the command BlockInput(1) However, CTRL + ALT + DEL will still work.
pbecks1963 Posted February 20, 2010 Author Posted February 20, 2010 (edited) Hello Melba23, I am an system administrator at a school and i need to make a evacuation alert-message for all pc's at school that will: -display an alert-message on all pc's -lock the mouse and keyboard -lock the system ("windows logo-L" on the keyboard)after 11 minutes Right now i have the above all covered within a vbs-script but i would really like it if i had an executable (and if i wouldn't have to use "kidkeylock.exe" ps: an additional bonus of using a executable would be that passwords i use in the script can't be read anymnore. (is safer that way) Edited February 20, 2010 by pbecks1963
Moderators Melba23 Posted February 20, 2010 Moderators Posted February 20, 2010 pbecks1963, I am an system administrator at a schoolIn that case you know exactly why I asked! As D4ni has already stated, BlockInput will stop mouse and keyboard input - but as far as I know, nothing in Autoit can block Ctrl_Alt_Delete. Send should still work and enable you to lock after a certain period, which you can easily determine using TimerInit and TimerDiff. To display your alert message, you could use MsgBox (a standard Windows message dialog), SplashText (a customisable popup) or perhaps my ExtMsgBox UDF (which lets you add colour and change the font size). Are you happy to make a first cut at the code yourself - or would you like a skeleton? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
pbecks1963 Posted February 20, 2010 Author Posted February 20, 2010 Forgot to mention, I use psexec to remotely startup a local script on the remote pc´s
dani Posted February 20, 2010 Posted February 20, 2010 (edited) He likes to have a fullscreen notice so I'd actually recommend a GUI as wide and high as the screen (using @ScreenWidth & @ScreenHeight) and put a GUICtrlLabel on it. I once used this: Func DisplayPopup() $popup = GUICreate("", 400, 250, -1, 10, $WS_POPUPWINDOW, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) GUISetBkColor(0xfffacd, $popup) $title = GUICtrlCreateLabel("Title in bold", 85, 15, 250, 50, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($title, 15, 400, 4, "Comic Sans MS") $1 = "Lots of text #1" ; I divided the whole text in 2 parts to keep it readable and make the line not too long, $2 = "Lots of text #2" ; you can ofcourse just put these together in 1 variable $label = GUICtrlCreateLabel($1 & @CRLF & $2, 10, 75, 375, 350, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($label, 14, 400, 0, "Comic Sans MS") GUISetState(@SW_SHOW, $popup) EndFunc ; ==> DisplayPopup() Remember this one isn't fullscreen, but as I said you can use @ScreenWidth & @ScreenHeight when you create the GUI & the label. Edited February 20, 2010 by d4ni
Moderators Melba23 Posted February 20, 2010 Moderators Posted February 20, 2010 pbecks1963,I have not forgotten you, but I have run into a problem. What OS are you using? I ask because I cannot get Vista to recognise Win-L when I send it. Vista recognises Win-R and many others, but not Win-L. I suspect UAC or something similar - Google suggests that this might be the case. I will keep trying.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
dani Posted February 20, 2010 Posted February 20, 2010 Melba23,You can use PsShutdown from Sysinternals to lock the computer. pbecks1963 obviously has to put this .exe somewhere, or just include it in his script
pbecks1963 Posted February 20, 2010 Author Posted February 20, 2010 (edited) My my, lots off replies! We use windows xp (sp3). About 150 pc's I have a html page (local) that has the evacuation-alert (with logo of the school & exit sign graphic) In the scripts that runs local on all pc's i have the following happening: 1) run iexplore.exe -k (kiosk mode, full screen) with the evacuation-alert html-page 2) immediatly after that i lock the mouse/keyboard with kidkeylock.exe 3) after 11 minutes i lock the pc. So a text popup won't do it for me. I want a graphical & text message to appear on all screens. ps: the local scripts are activated remotely (from 1 pc) with the command "psexec" (from sysinternals). I have a vbs-scripts that reads a txt-file that contains the names of the workstations and then run psexec to activate the remote script. Edited February 21, 2010 by pbecks1963
Moderators Melba23 Posted February 21, 2010 Moderators Posted February 21, 2010 pbecks1963, Sorry, but as I have no experience of working with networks and am unable to test any code I might suggest to lock the machines on my Vista system, I am bowing out. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
AgentSmith15 Posted February 21, 2010 Posted February 21, 2010 (edited) To get around people canceling Ctrl - Alt - DEl, just have your script search for Ctrl Alt and the have it press another key other than del. [EDIT] Sorry for the messy post I was doing 2 things at once and trying to concentrate on both So Yea have your script search for both Ctrl and Alt being pressed and then have it your script to punch in another letter like G. If you are a real admin you can disable the Ctrl - Alt - Del command through Active Directory for the network. Edited February 21, 2010 by AgentSmith15 [center][/center]
pbecks1963 Posted February 22, 2010 Author Posted February 22, 2010 (edited) Hello y'all, I "wrote" this test-script (my first autoit script) to check if i could: -Execute a command HIDDEN -Execute a command with a parameter -Block the input off the mouse & Keyboard -make the script sleep for a while -release the mouse & keyboard lock Unfortunetly i am on a Windows 7 pc (right now), so Block input doesn't work (will be testint this script in a few days on a win xp pc) Do you have any suggestions or critical observations perhaps? ************************************ BlockInput(1) sleep(3000) Run("C:\Program Files\Internet Explorer\iexplore.exe -k c:\page\localpage.html") sleep(3000) run("cmd /c dir c: /p > C:\Users\patrick\test1.txt & pause","",@SW_HIDE) sleep(10000) BlockInput(0) ************************************ ps: In the end i will compile this script to an executable. This executable will do the following: -Show a full screen html-page (local on the pc) with a evacuation-alert. -Lock the input from mouse & keyboard -Wait for 11 minutes -Unlock the mouse/keyboard -Lock the pc ("windows logo-L") (hidden command execution: rundll32.exe user32.dll, LockWorkStation ) Edited February 22, 2010 by pbecks1963
Bert Posted February 22, 2010 Posted February 22, 2010 (edited) PM sent for what I have in mind is not safe for noobs or kids who like doing bad things. Edited February 22, 2010 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
pimpaulogy Posted August 30, 2010 Posted August 30, 2010 PM sent for what I have in mind is not safe for noobs or kids who like doing bad things.Any chance I can get that PM too. I am having issues with the BlockInput running on Windows 7 (doesn't seem to work). I am trying to change the background image (wallpaper) on a Windows 7 device, force the wallpaper to immediately refresh, and then minimize all the active windows so the end user can see the change. I work in an environment where we frequently have to change the end users wallpaper back to the company standard since end users like to change it to their own pictures/photos/whatnot. I am able to change and refresh on Windows XP without any problems with a simple bat script and windows dll calls, but those have been changed with Windows 7. After searching high and low, I finally found the right VBS script/syntax to change the wallpaper immediately on a Windows 7 device, but it's through the GUI so the end user could just click away from the active personalization window. I need to block the input from the user while the script executes and then re-enable once script is done.Any assistance on this would be greatly appreciated.
Bert Posted August 30, 2010 Posted August 30, 2010 Any chance I can get that PM too. I am having issues with the BlockInput running on Windows 7 (doesn't seem to work). I am trying to change the background image (wallpaper) on a Windows 7 device, force the wallpaper to immediately refresh, and then minimize all the active windows so the end user can see the change. I work in an environment where we frequently have to change the end users wallpaper back to the company standard since end users like to change it to their own pictures/photos/whatnot. I am able to change and refresh on Windows XP without any problems with a simple bat script and windows dll calls, but those have been changed with Windows 7. After searching high and low, I finally found the right VBS script/syntax to change the wallpaper immediately on a Windows 7 device, but it's through the GUI so the end user could just click away from the active personalization window. I need to block the input from the user while the script executes and then re-enable once script is done.Any assistance on this would be greatly appreciated.A real simple way to nip that in the bud is simply use Active Directory to set the profile so that they can't change it. To keep them out, you simply prevent the user from accessing the controls to change the desktop wallpaper. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now