Popular Post RTFC Posted June 28, 2015 Popular Post Share Posted June 28, 2015 (edited) Two tiny, simple scripts (secondDesktop & desktopSwitch) that elaborate (slightly) on _WinAPI_CreateDesktop() to create a second workspace with some interesting features:Startup: define any number of programmes to be auto-started on the second desktop, hard-coded (by you, in desktopSwitch.au3) or parsed as parameters (from secondDesktop.au3);Full desktop mode: provides acccess to all your desktop shortcuts, start menu (Win7), taskbar, plus a one-button switch in both desktops;Kiosk mode: provides an empty workspace where only your designated startup entries will run; Switch button/GUI is absent; an unadvertised hotkey provides switching to the original desktop (Ctrl-Alt-Del still works, but a task manager started on the second desktop will appear on the original desktop). To enable kiosk mode, set flag $kioskmode=True in secondDesktop.au3;Security: software keyloggers running in your regular environment cannot capture keystrokes on the second desktop, and windows messages cannot be sent between desktops, so your apps won't be hijacked easily through remote control. (NB not extensively tested; use at your own risk!) In full desktop mode, the (red or green) background colour of the Switch GUI shows you whether you are on the exposed or secure desktop.I SecondDesktop.v0.8.7z (first beta release)Important: you'll need to compile desktopSwitch before running secondDesktop. You can test your edited version of desktopSwitch.au3 "dry," as a script on your regular desktop first, by setting its internal flag $testing=True; but don't forget to reset that flag again before compiling. Edited June 28, 2015 by RTFC JiBe, Gianni, coffeeturtle and 2 others 5 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JiBe Posted June 28, 2015 Share Posted June 28, 2015 Very good job!! Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted June 29, 2015 Share Posted June 29, 2015 I tried it out, it seems to work as designed but for it to be a real and true kiosk I would need to impliment icons/shortcuts to the desktop.I think the best way would be to have a folder call "Kiosk" or similar at the Script Dir and have it copy any contents found in that folder to the "Kiosk Desktop" Simply having a browser open would not work, because if they close it they have no way to open it again without a start bar or task bar. Link to comment Share on other sites More sharing options...
RTFC Posted June 29, 2015 Author Share Posted June 29, 2015 @jeanphile: Thanks!@ViciousXUSMC: Thanks for trying it out. It's funny you should mention that, I'm just exploring support for a separate set of alternative desktop shortcuts (but shortcuts for "all users" are still being added to the ones I've selected).However, kiosk mode as I understand it (and would want it to work) is to prevent the user from starting any programme, and merely interact with whatever is already running, perhaps with an added fail-safe to restart any app that is inadvertently (or intentionally) closed. Your browser/file manager idea could work if you would monitor it to restart automatically when closed. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted June 29, 2015 Share Posted June 29, 2015 Yes, you could do a loop that re-opens a process if closed. It's not very traditional but it would work.Normally I have a few shortcuts to the main sites the Kiosk user needs to get too since the average user may not be very familiar with using bookmarks in the browser, also we may have some documents say word documents or pdf forms for the user to be able to fill out and print.You will have to share with me your findings in how to add the shortcuts, I can see what I need to do from there. Link to comment Share on other sites More sharing options...
RTFC Posted June 29, 2015 Author Share Posted June 29, 2015 (edited) Well, I just got it to work (custom shortcuts without CommonDesktop shortcuts), but I'm still tinkering with various related bits, so it may be a few days before the next release. But your comments and interest are appreciated! Edited June 29, 2015 by RTFC My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
coffeeturtle Posted June 30, 2015 Share Posted June 30, 2015 Great work! Thanks for sharing! Just a thought...Perhaps instead of using if not fileexists ("desktopSwitch.exe") to verify if the script is already compiled at runtime, you might want to use instead @Compiled: @CompiledReturns 1 if script is a compiled executable or an .a3x file; returns 0 if an .au3 file. Link to comment Share on other sites More sharing options...
RTFC Posted July 1, 2015 Author Share Posted July 1, 2015 @coffeeturtle: Thanks a lot!Regarding your macro suggestion, I don' think that would work the way you think it would, as @compiled checks whether the current script is running as exe, and I'm checking from secondDesktop.au3/exe whether desktopSwitch is available as exe, not secondDesktop itself (which does not have to be compiled). I could have desktopSwitch check itself, but by then the second desktop would already be created, and the check was implemented as an early-out as soon as possible. But if I misunderstood your suggestion, feel free to elaborate. coffeeturtle 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2015 Share Posted July 1, 2015 If DesktopSwitch should always be compiled in order for your application/utility/tool to work correctly you could test if it from SecondDesktop early on,I mean if it absolutely has to be compiled and not just have the extension .exe.Perhaps DesktopSwitch should test for the existence of particular command line switch, and if present exit with 1 if @Compiled or 0 if not.SecondDesktop first runs DesktopSwitch first with the switch, and exits with a warning if it is not compiled.If you get my rabid gibberish. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
RTFC Posted July 1, 2015 Author Share Posted July 1, 2015 Hi JohnOne, not gibberish at all, it makes perfect sense to me. I'd never even considered that someone would be foolish enough to just rename an .au3 to an .exe. You solution is certainly interesting, and would be easy to implement. Thanks. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2015 Share Posted July 1, 2015 I'd never even considered that someone would be foolish enough to just rename an .au3 to an .exe.Never under estimate how foolish some people can be I made some software for a friend, it included 4 exe files, all prefixed with "john" so he knew what they were, he had me take a look because they stopped working, he's replaced "john" with "matty" his own name. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
RTFC Posted July 1, 2015 Author Share Posted July 1, 2015 Wow. I hope you managed to keep a straight face... My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JohnOne Posted July 1, 2015 Share Posted July 1, 2015 I felt like strangling him, I was in the pub when he accosted me I just recompiled with matty and went back the pub Sorry for off topic. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
coffeeturtle Posted July 1, 2015 Share Posted July 1, 2015 My mistake, sorry. I totally see what you mean now. @coffeeturtle: Thanks a lot!Regarding your macro suggestion, I don' think that would work the way you think it would, as @compiled checks whether the current script is running as exe, and I'm checking from secondDesktop.au3/exe whether desktopSwitch is available as exe, not secondDesktop itself (which does not have to be compiled). I could have desktopSwitch check itself, but by then the second desktop would already be created, and the check was implemented as an early-out as soon as possible. But if I misunderstood your suggestion, feel free to elaborate. Link to comment Share on other sites More sharing options...
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