JScript 71 Posted June 19, 2010 Hello, Does anyone know how to pass the code below to AutoItv3? bool switchdesktop = true; int initDesktop(void) { DWORD res = -1; if (!switchdesktop) return 0; HDESK hdesk = OpenDesktop("default", 0, TRUE, GENERIC_ALL); if (hdesk == NULL) return res; if (!SetThreadDesktop(hdesk)) goto end; if (!SwitchDesktop(hdesk)) goto end; res = 0; end: CloseDesktop(hdesk); return 0; } http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)Somewhere Out ThereJames IngramDownload Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Share this post Link to post Share on other sites
KaFu 295 Posted June 19, 2010 A search for switchdesktop revealed this post... OS: Win10-1909 - 64bit - German, AutoIt Version: 3.3.14.5, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2019-Dec-21) BIC - Batch-Image-Cropper (2019-Dec-11) COP - Color Picker (2009-May-21) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2019-Dec-07) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Share this post Link to post Share on other sites
JScript 71 Posted June 19, 2010 (edited) A doubt which of the two examples is correct? @KaFu (Xenobiologist) DllCall("user32.dll", "int", "OpenDesktopA", "str", "Default", "int", 0, "int", False, "int", $DESKTOP_SWITCHDESKTOP)or @Mobius (Sent me PM) DllCall("User32", "int", "OpenDesktop", "str", "default", "int", 0, "int", 1, "int", 0x10000000) Edited June 19, 2010 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)Somewhere Out ThereJames IngramDownload Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Share this post Link to post Share on other sites
KaFu 295 Posted June 19, 2010 Start Xenobiologist example and hit CTRL-ALT-DEL... OS: Win10-1909 - 64bit - German, AutoIt Version: 3.3.14.5, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2019-Dec-21) BIC - Batch-Image-Cropper (2019-Dec-11) COP - Color Picker (2009-May-21) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2019-Dec-07) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Share this post Link to post Share on other sites