I am using line code under detail for up arrow key to type "UP" in notepad
SendKeys.Send("UP");
This is working exactly in My notepad process but
I need use The above Line code in another application except notepad like games
I had guess The notepad process should be change to another process that i would like work on it but
was not good and not work in my game process
Any suggestion can be useful
On windows 10.
I need to automate the repeated process of these steps.
1. Open up an image in GIMP. Scale it to 110%.
2. Export as somefile name(for example input001.jpg).
3. Go to http://deepdreamgenerator.com/ in a browser. click on button, browse to the exported file.
4. Wait for it to generate result, save image as result file (for example dream001.jpg).
then repeat from step 1 with the result file from step 4...but keep increasing the filename number so export it as input002.jpg...
What software would allow me to do this?
the only software i know of that * MIGHT * be able to automate that process is AutoHotKey
You would need to keep the windows which you're automating static (ie. make sure they don't move) and then write keyboard and mouse macros in autohotkey to press the buttons and do the things you want.
I tried AutoHotKey but didn't feel like learning a whole new scripting language so I found something simpler called GhostMouse.
It just has record,play,stop buttons.
after recording and closing out of program it asks if i want to save script. clicked yes gave it a name, and then edited the script file..and copied and pasted as many times as i wanted the script to run (before copying and pasting i deleted the last 3 lines which has to do with clicking the stop button which i didn't want the script to do).
You can also try Sikuli for same. It's an image comparator
http://www.sikuli.org/
Reference :-
http://doc.sikuli.org/tutorials/
In no program that is capable of editing text (such as notepad, Notepad++, or Chrome) on either my Windows Vista or Windows 8 laptops does CTRL+LEFT move the cursor to the previous word.
Prior Troubleshooting Steps (other than researching):
CTRL+RIGHT moves the cursor to the next word.
CTRL+SHIFT+LEFT highlights the previous word.
I put the following line in AutoHotKey (and saved/reloaded the script) and CTRL+LEFT then moves the cursor to the next word (as it should):
^Left:: Send ^{Right}
As step 3 above, but the following line did nothing when I used ALT+LEFT.
!Left:: Send ^{Left}
I'm at a loss. I run Avast Antivirus, Spybot, and ZoneAlarm Firewall on strict settings and scans aren't turning up anything. Rebooting in safe mode has no effect either.
Are you running any other AutoHotkey scripts on these computers that have Ctrl or Left Arrow set as hotkeys?
If so and you are not using #IfWinActive or ~ then it's possible you are blocking yourself by having those keys Hooked.
http://www.autohotkey.com/docs/FAQ.htm
http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
You can also try various methods of Sending those keys, SendRaw, SendInput, SendEvent etc... More details here:
http://www.autohotkey.com/docs/commands/Send.htm
To verify that the keys are being read by your script...
Run a script with:
#InstallKeybdHook
~LCtrl & Left::
Send {RCtrl Down}{Left Down}{RCtrl Up}{Left Up}
Double Left Click AutoHotkey Script Tray Icon->Select View->Key history
Press Ctrl + Left and verify that your keys are being read.
If all the above has be tried, it is possible that some software on your system has Hooked your Keys and you will have to figure out what you installed recently and remove that program. Good luck.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm just noticing that on my laptop (Dell XPS 15z) there's no BREAK key (no dedicated number keypad). I'm running the debugger step-by-step and then when all seems fine, I just let it play out. However, it's running in an infinite loop and now I'm realizing there's no way to stop it without the break key!!!!
Is this a bad joke? I had to reboot the computer; is there a more graceful way??
just press the escape key twice ;-)
Solution #1 (It works most of the time):
When some particular keys (Pause, Break or ScrLk) are missing on the keyboard and pressing Esc 2, 3 or multiple times doesn't stop the macro too.
Step #01: If your keyboard does not have a specific key, please do not worry and open the 'OnScreen Keyboard' from Windows Utilities by pressing Win + U.
Step #02: Now, try any of the below option and of them will definitely work depending on your system architecture i.e. OS and Office version
Ctrl + Pause
Ctrl + ScrLk
Esc + Esc (Press twice consecutively)
You will be put into break mode using the above key combinations as the macro suspends execution immediately finishing the current task. For eg. if it is pulling the data from the web then it will halt immediately before executing any next command but after pulling the data, following which one can press F5 or F8 to continue the debugging.
When Solution #1 doesn't work or you need a permanent solution then try adding a new KEY to the Registry. (I am running Win 10 Creators Update on Dell 3530 Inspiron Laptop)
Disclaimer: Please only make changes to Windows Registry at your own risk and it is advisable only if you are windows administrator or have prior experience in the changing the key values in the registry.
You can also look for Solution #2 which use accessibility keyboard Win + U
Solution #2:
1) Click the START, then type REGEDIT into the search box. This will start the registry editor.
2) Explore the Registry, expanding each element
HKEY_LOCAL_MACHINE
-SYSTEM
-Current Control Set
- Control
- Keyboard Layout
Click on the Scancode Map, and EDIT the key values to match that shown below.
i.e. to have values of : 00,00,00,00,00,00,00,00,02,00,00,00,46,e0,44,00,00,00,00,00
Once Done you will need to reboot your laptop, but after that, you can use as the pause/Break Key.
To understand it in detail and customize it as per your needs, please refer this link: KeyBoard Scancodes
I have a Dell Precision without a Pause/Break key but there is a replacement for that: Fn + B, so:
- Fn + B == Pause (pause execution);
- Ctrl + Fn + B == Break (break execution);
- Win + Fn + B == Windows + Pause (open System properties).
You can execute the command:
dir /s C:\
and test the Pause and Break combination keys while dir lists all files in drive C.
reference
Despite this being an old question, I have just encountered the same issue and discovered that Ctrl+Scroll lock works as a break.
"Scroll lock" can be accessed on my DELL Laptop via the blue function key "Fn" and the "F6" key which has a small blue lock symbol on it with an ⇳ symbol in it. At other computers it may look like ⤓ . So effectively I press Ctrl+Fn+F6.
I have an HP laptop and this works when I want to break after a msgbox, hold fn+ctrl and click right shift key (has pause on it as well) then respond to msgbox and code will break.
On my Dell at least : ctrl + alt + esc BEFORE your cursor starts looping itself
I got this info from aidangrogan on this website :
http://en.community.dell.com/support-forums/laptop/f/3518/t/19355018
So I don't claim to have found it myself. All credits to him (or her)
Hold CTRL+Fn & hit Shift - Stopped my macro from running. I don't have a 'Break' key either on the keyboard of my HP Pavilion G7.
Ctrl + Fn + B works for Excel 365 (Office 365) on my Dell Latitude 5480 (no Break key).
I found this thread and saw the solution that has the most votes, but then realized my laptop has no Pause, Break or ScrLk) keys. I tried other proposed solutions, like 'OnScreen Keyboard' or alternative key combinations, but those didn't work either.
Then it hit me: if it's a phantom break point associated with particular line(s) of code, why not just get rid of the line(s)?
So that's what I did:
I cut the line(s) where execution was breaking.
Ran the macro again (it didn't break this time)
Pasted the line(s) again.
It worked for me, when no other key combination (onscreen or physical) worked. Hope it helps someone!
None of the above answers work for me.
I did how ever find this, it's not perfect since you need to keep ALT pressed and then a keys twice. On top of that it's depended on what language your Excel is set to.
In an English Excel you'd use ALT + R + R in German you need to use ALT + U + R
I have a Japanese Layout keyboard. I neither have a scroll lock nor a break on my laptop-Lenovo E470.
A long press on the Esc key worked as a terminator for me.
I found a way round this, opened another instance of Excel and another spreadsheet, then opened the VBA editor from there and it showed as "running" so I could click the stop button
Because all of the above werent working for my application, I ended up writing a VBS script which I can run from the terminal. Not elegant. Probably not the first choice if one of the others work. But, effective.
break.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^%{BREAK}"
I picked vb.net for this question since it's the only prgramming language I am fairly familair with, but if C++ or something else is more suited for this, I am willing to learn something new.
What I am trying to do is:
Retrieve text from database (this already works in vb.net) and copy it to clipboard
Switch primary screen to the external application I want to work with (example: word or open office)
Emulate key-press Enter
Paste text and hit Enter again
Emulate key-press Ctrl and then emulate a click on a pre-defined spot on the screen (like 500pixels from left, 740pixels from top).
Save screenshot, using a second value from the database as the filename (the naming part should be easy)
Emulate another click on another pre-defined spot
Repeat for next text in database.
I wouldn't know where to start, though. I guess the most important part of what I'm trying to achieve is; switching focus to an external application and emulate keypresses and mouse clicks on it.
use http://www.autohotkey.com/
write a console app to get the value from the database
1 - get autohotkey to run the console app and put the return into the clipboard
then continue as described in your list.