Comments (2)
if "VD examples.ahk" works fine, then you got it
VD.ahk was not meant to be ran, it was meant to be #Included by other scripts
because I can't, I need you to tell me
what should the README.md have included ? so that when you saw it, you wouldn't have had this confusion
Spoiler warning, click here to see more After you thought about it
would adding something like this work? :
VD.ahk will crash/close immediately, run "VD examples.ahk"
I just realized, you could have been misled by "no dependencies"
were you misled by "no dependencies" ?
My Attempt at Explaining
why are there 2 files VD.ahk and VD examples.ahk ?
say you have a project "app manager.ahk" that needs Virtual Desktop Capabilities,
you #Include VD.ahk into "app manager.ahk", then you have Virtual Desktop Capabilities (in code, this means VD
methods)
"VD examples.ahk" is an example of such project: it #Includes VD.ahk, then it is able to call VD
methods
like when you press Numpad2, it will call VD.goToDesktopNum(2)
Line 74 in 077160a
you can say that VD.ahk is a class, or a library, or functions,
that said, VD.ahk and VD examples.ahk CAN be merged into 1 file,
but this would cause problems for people who want to use this script in their other scripts
read: pmb6tz/windows-desktop-switcher#47
why does VD.ahk close immediately ?
well, the program finished everything it had to do, so it exited
VD.ahk has no hotkeys, no code to run, it was done doing everything it had to do, so it exited
whilst "VD examples.ahk" does stuff : when you press a hotkey, it will do stuff
from vd.ahk.
Thanks for the detailed explanation. Here's what went through my mind when I downloaded your script for personal use:
Seeing the file's name, "VD examples.ahk" gave an impression as if it's a demo file. The message box on launch further validated my assumption. It had detailed actions that one could do with the script.
Such instructions are generally put inside the "Read me" file. And then, the script just works after launch. One need not be greeted with documentation every time the script is launched.
I thought "VD examples.ahk" is the demo file and "VD.ahk" is the main script for the reasons mentioned above. Or in other words, I assumed: "VD.ahk" = "VD examples.ahk" - (Message box having a brief documentation)
I get that we can remove the message box by manually editing the concerned part of the script. However, users generally want the script to work without modifications.
Words of caution: I'm not a software engineer. I'm an ordinary man who thinks using common sense. Perhaps's it's the reason I misunderstood a seemingly obvious part.
Thanks again!
With Appreciation
Anurag
from vd.ahk.
Related Issues (20)
- After pinning with AH2 version, I get an error when switching desktops by number.
- Script sending "Q" to discord | Desktop switch failure. HOT 2
- getDesktopNumOfWindow sometimes returns -1 rather than the correct num HOT 4
- Error HOT 10
- open Application directly on one virtual desktop in background HOT 2
- "Error: (0x80004002) No such interface supported" after updating Windows 11 (Beta insider channel) HOT 13
- sending keypress to specified virtual desktop only.
- Ah2: Desktop Looping & Switching + Other Feature Regression from Commit ee2f54f626914273f00853306c1daaf803f756cb HOT 2
- It doesn't work on Windows 11 Build 22621.2215 (22H2) HOT 2
- A problem with the new Windows update 11 HOT 18
- Virtual desktop Tasksbar icons HOT 4
- renaming desktops HOT 1
- Switching to Relative Desktop fails initially HOT 2
- Current desktop count is always zero
- New Windows Build 23606: VD.getCurrentDesktopNum() always returns 0 HOT 4
- Windows Server 2022 version HOT 3
- It doesn't work on Windows 11 Build 22631.3085 (23H2) HOT 13
- v2_port分支没有 TogglePinApp,PinApp,UnPinApp HOT 2
- WinExist in another virtual desktop HOT 7
- Previous Desktop HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vd.ahk.