I never had problem with this DLL but now...
I need to send this key combination Capslock + Q.
My code is SendKeys("{CAPSLOCK}q") but it sends Capslock first and then Q key.
Where I got wrong?
Professional Software Development Tools
I never had problem with this DLL but now...
I need to send this key combination Capslock + Q.
My code is SendKeys("{CAPSLOCK}q") but it sends Capslock first and then Q key.
Where I got wrong?
You should read better Sendkeys instructions:
Also consider that CapsLock is not a "modifier" key, so probably is Windows that does not take in count that the Capslock+Q are pressed together, not SendKeys.To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".
To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 42} means press the LEFT ARROW key 42 times; {h 10} means press H 10 times.
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
Ok Cybergraph it seems "no skills" is my problem!
In my project I've a button that runs an application called Virio.exe
After used it I want close Virio by CapsLock+Q combination.
In Global I have:
Any suggestion for me?function SendKeys(sSendString)
sSendString = "\"" ..sSendString.."\""
result = DLL.CallFunction(_SourceFolder.. "\\AutoPlay\\Plugins\\KS.DLL", "KEYSTROKE", sSendString, DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL)
end
I can't Kill Virio.exe because tray bar icon causes problems.
It need to be clòosed by CapsLock+Q or Ins+Q
Thanks
Why you don't terminate the Virio.exe process using the Window.Close function?
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
Because Virio doesn't have a window.
Virio is a customized version of NVDA Screen Reader.
I used this code but It doesn't work
Please tell me the exact code for CapsLock+Q combination so I try.-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();
-- A variable containing text in the title you want to search for.
window_name = "virio";
-- Loop through the table of windows.
for handle, title in pairs(windows) do
-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);
-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
end
end
Yhanks for help
Use System.EnumerateProcesses and System.TerminateProcess instead.
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
By using this_
the applicatio was killed but tray icon does not refresh, stayin visible but useless.instances_of_file = 0;
file_to_check_for = "virio.exe"; --have all lowercase
processes = System.EnumerateProcesses();
for j, file_path in pairs(processes) do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
System.TerminateProcess(j);
end
end
I would try with the exact code using Keystrokes.dll
Tell me the right code for CapsLock+Q Or Insert+Q Please.
If you read (and you must do) with attention the user instructions, you will note that:
Arg3 - String of target window title (See Note1 and 2)But Viria.exe has not a window, so the problem is still there.Note2: In place of the window title you can use too the number returned by Shell function. Empty title (Quotation marks without text) sends keys to the active window.
Also, the icon that does not refresh, is due to the fact that the just closed app has not focus and this will happen with ANY way you close the app.
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
Give a look to SendKeys.exe here: http://cpap.com.br/orlando/SendKeysM...IdC=OrlMoreWin
The problem of the non existing window continues to exist, but at least you have something to read...With these codes {VK nn} and {VK_nn}, you can send any key or key combinations. Pressing a control button sending its {VK_nn} code, it will be pressed until its {VK nn} normal code is sent. For example, if you want to send the shortcut key composed by ‘Windows Button’ and the letter ‘R’, first send the ‘Windows Button’ key only downing, then the ‘R’ key, and finally the ‘Windows Button’ key normally to release it, like this: {VK_91}{VK 82}{VK 91}
(why should I always search ... and find(!) solutions for others?)
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
No dear Cybergraph, I'm a newbie but I read, search and more.
Sendkeys is a freeware and I can't redistribute it.
So I decided to avoid It from mi little app.
Then a doubt: Keystrokes.dll sends keystrokes only within the AMS app or externall app too.
Do you confirm this?
How can you argue this? Is there a limitation in the license provided by the author? Have you asked the author?
Keystrokes.dll is not the same (free)?
Maybe in your searches you have not found this clear example that automates Notepad, so the answer is obvious.Then a doubt: Keystrokes.dll sends keystrokes only within the AMS app or externall app too.
Do you confirm this?
We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
This is Sendkeys license
As you can see I'm not allowed from author.
You are right, I read without attention.
But you don't want really help me.
You want humiliate me.
Ok follow me please:
My brother is blind and I need this little app.
He wants share it between his forum users
I need a little window with only a button that sends Caps+Q to an external app called Virio.exe
You say that it doesn't work (cause Windows) but I would try.
Could you send me an .apz?
Thank you
You are not allowed to redistribute it with your application. But it does not say that you are not allowed to use it in your application. So, the easiest way to solve this problem without infringing the license is make your application download the file, after asking the user for permission (and perhaps opening a browser window with the home page for a single time). Once downloaded, you know where it is (use HTTP.Download) and can start using it in your application, because it doesn't even require installation.
Ulrich
@Ulrich
Thank you for suggestion, this method could be useful for more external components.
@Cybergraph
Thanks anyway for dedicated your time.
Looks like that is a global hotkey
using SendKeys might not work
this function may help you to get it to work
keybd_event()
this function can be called from AMS via DLL.CallFunction()
simply , you will simulate key strokes
- VK_CAPITAL is down
- VK_Q is down
- VK_Q is up
- VK_CAPITAL is up