I want to create an exe file to press a key at specific time using batch file or other programs (for example press ENTER at 2:00 AM)
I'll be appreciated if you introduce a program whit this ability to me even non-free software
thanks in advance
I have some links for you. What you have to know is:
How to press a key with batch file
How to run a batch file at a specific time
[Edit]
There is a nice program called AutoHotkey wich does exactly what you want. There is even a thread opened in the forums, explaining on how to execute the script at a specific time:
https://autohotkey.com/board/topic/20166-execute-script-at-specific-time/
Related
I am editing app code to increase floors in tiny tower.
My dilemma is I need to have a large amount of text with a single number increasing by one after some constant text repeating over and over.
Sorry, I'm not good at describing what I need so I'll show y'all an example of what I need.
[Fs]**X**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|
I need this line of text repeating over and over again with the exception of the bolded X increasing by 1 every time the text repeats.
Such as
[Fs]**1**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**2**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**3**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**4**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]| ETC...
I have manually written this code out to 5000 lines and I can't take it anymore. I don't know how many I need but if someone could give me either straight up the text that I need or some way for me to do it myself that would be amazing.
I need it to count up to at least 10k and id say 100k at the max.
Thanks for your help and please ask any questions if you need them answered to further help me.
In bash you could do
printf '[Fs]%s[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|\n' {1..100000} > /path/to/the/outputfile
To create a file outputfile with the first 100k lines.
On Linux or Mac open a terminal (on Windows you can use WSL, gitbash, or cygwin), type bash, press enter, type the command from above, press enter again.
I only have one machine and want to save some variable values like a = 3 in linux. I can resume the last progress if power-off suddently happens.
I can only figure out two ways, one is to save in files and the other one is save to DB.
Are there any special ways to do like this without saving in files or db? any programming language is ok.
I guess there is some confusion. Do you want to save the state of your program? If so then use text editor which saves your progress even if you don't save it using ctrl+s, like sublime or gedit. Otherwise please elaborate more on what you want.
What needs to be done?
I need to make a connection to the remote machine through UNIX, go to the shared drive, open an excel file, save it and close it. This needs to written in an script.
The file contains macros so they needs to be opened manually on daily basis, save it and close it. We plan to write a script that would run on daily basis and refresh this file automatically.
Where am i facing the issue?
Making a connection to the remote machine is done, after that i run certains commands:
1. Open the command prompt
2. cd the file path
3. Open the File
Now this is where the issue starts
How to save the file automatically?
How to close that file?
I tried using the taskill option and it almost worked but it gives out the popup of Do you want to save the file and i dont know how to provide output to that popup through command prompt.
Let me know if you have any idea on how to move ahead on this.
A bit hackish, but xdotool, a program which simulates mouse clicks and keyboard presses could be used. If Windows is being used, then see this question for tools which simulate mouse clicks and keyboard presses.
Have you tried SendKeys?
That may help.
Good day,
I am a CNC program not a computer programer. I am using CAM software to make cutting programs for our CNC router. The router is a bit old and can only take files 200-300 kb big. We are doing carvings that require 1-2 megs text files. I am using a program called GSplit ( http://www.gdgsoft.com/gsplit/ ) to divvy up the text file. It generates 10-25+ files with a custom header that our machine can read. All the files are great and it works, but I have to manually add the closing lines/footer to each file. The files that are created and used are normal .txt files but with a specific extension, .ANC.
Is there any way to automate this process of opening each individual file, scrolling to the end and copy/pasting the same 1-2 lines of code? The files are NAME[number].ANC in a contained folder. Would it be possible to just direct to a folder and say "add this 'text' to every file in this folder"?
Thanks for your time.
What OS are you using? Using Unix you can do a simple script on command line. If you are in the directory with the specific files simply execute:
for file in *; do echo "APPEND THIS" >> $file; done
If you are running Windows you should be able to do the same using cygwin (probably you could also use the power shell, but I don't know anything about the that)
I found a program Notepad++ (apparently the last person to find it...). USed the find/replace files option. A regular expression(note sure exactly what these are but I'm sure you guys do) "\s+\z" as to what to look for. It finds the last space or whatever at the end of all the files and then adds the code I need. Easy, free, and I don't need to write any computer code. Thanks for the attempt to help me Dirkk! :)
How to clear Python shell ?
I am writing a module in python, I want to save it in a file. what is the best way to do it?
File -> New Window. Put your module in this new window, than save it. To run, just press F5.
Python shell does not get cleared or saved. Perhaps you are using IDLE. It's a confusing piece of software. I'd recommend you to get a real IDE, or at least a proper text editor.
Something that I do in IDLE is print "\n"*100
You can also extend Idle and map that to a key. Read Pythoninstall\lib\Idlelib\extend.txt for details
http://bytes.com/topic/python/answers/737111-extension-idle-clear-screen-but-how-write-screen
If you are just in console, you can do ( which won't work in IDLE):
import os
os.system("cls")
Just copy and paste the code into a new file (In file), and save it. To run, you can go to the run section and select "Run Module", or you can simply press F5.