I have a python script automate.py and I wanna run it via CMD.
As I know to execute python via CMD is something like this
$CMD = "Something python here" Run(@ComSpec & " /c " & $CMD) But how can I just open the 1 CMD and send multiple commands to the CMD based on the function called?
For instance like:
Launch CMD and send python then send import automate If google() function is called - send automate.google() to the CMD If yahoo() function is called - send automate.yahoo() to the CMD I don't want to execute multiple CMD to call the automate functions. This is due to inside the python script have global variable to handle duplicate flag.
So if I execute multiple CMD to call the functions, the global variable will be keep new as NULL. Which is not my expectation.
I only found that AutoIt can actually execute the entire python script or execute the .exe (converted to .exe from .py)
But what if I just want call the particular function? If that possible to do so?
This is because python can't create fancy GUI like AutoIT does. So my plan is use AutoIT to have fancy GUI.
Then each buttons will trigger specific function in the python script or .exe file.
btnSum - trigger function in python script or .exe file (funcSum)
btnMinus - trigger function in python script or .exe file (funcMinus)
Thanks for advance information.
Hello my friends
Can we create a single context menu on more than one item?
For example, a context menu includes standardized options on more than one control, such as buttons or check boxes
to Create a context menu on one item am using this function
GUICtrlCreateContextMenu ($ HWND)
How to link it with more than one element please?
or if we can't do that, please give me a solution
so i tried to add an context menus to all the controls but the script will be long, for that if their are any solutions i hope to give it to me
thanks in advanced
This is another take on string triggers, triggers on specific strings.
Able to simple text pasting,
opening links (as long as there's a www. http:\\ or https:\\ at the beggining)
and is able to open applications, if there is a parameter in the parameter field, it uses it.
The user selects the modifier key, and then uses a combination of that key with a couple others to perform tasks like
screenshot the active window, (modkey + prtscr), turn off the screen (modkey + pause / break),
open clipboard string in registry (modkey + R), change system volume (modkey + arrouw up/dn).
The following keys pressed at the same time prompt for shutdown: S+D+T
The following keys pressed at the same time prompt for restart: S+R+T
Middle mouse button click on titlebar minimizes to tray, or a left mouse button click in the icon in the tray also minimizes.
Trigger is set off by space or enter, and timeouts after 3 seconds.
Shows your external, lan, and gateway ip's, can refresh with right mouse click, and opens the default browser if the correspondent button is pressed.
Able to change system volume by a set percentage, reading from the inputbox the number the user sets, if 0 or empty uses system default.
I made this because the existing string trigger applications didn't do it for me for a number of reasons.
I did this for me, but if someone finds it useful all the better.
Here is an other UDF for string handling :
_StringDateConvert: convert a date from one format ("YMD", "MDY" or "DMY") to another.
_StringIsDate: checks if a date with a given format is valid
_StringCount: count of occurrences that appear in a string
_StringFormatBytesSize: formatting a dimension expressed in bytes (bytes) in MB, TB, ...)
_StringIsEndingWith: check if a string end with some characters
_StringIsStartingWith: check if a string start with some characters
_StringJoinArray: concatenate elements of an array to rebuild a string
_StringPadLeft: filling a string with characters on the left
_StringPadRight: fill a string with characters on the right
_StringRemoveFrenchAccent: remove french accent
_StringRemoveChars: deleting characters from a string
_StringStrip: eliminate characters at the begin and/or at the end of a string
_StringTitleCaseFrench: capitalize the first letter of each word with elimination of french accents
_StringWSClean: simple replacement of "White Spaces", remove beginning and trailing spaces and multiple spaces removal
Any comments, suggestions for improvement or constructive criticism are welcome.
Below you will find the UDF and a demo program.