Jump to content

twixt

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

twixt's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks BrewMan that worked Send('RUN("' & @IPAddress1 & '", port_number, "conf_option")')
  2. I am having trouble getting the send command with one of the defined macros. I need to send to the active window a function with parameters. Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("RUN(""@IPAddress1"", port_number, ""conf_option"")") What I am looking for is something like this to be sent to the active window RUN("192.168.1.1", 52535, "filename.conf") getting the @IPAddress in quotes seems to screw up the send command syntax. Any help?
  3. Here is what I have so far. The easy part is done I think. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: name Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <ButtonConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> DyCal() Func DyCal() Opt("GUIOnEventMode", 1) GUICreate("DyCal", 800, 500) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") GUICtrlCreateButton( "PuTTY", 1, 51, 100, 50) GUICtrlSetOnEvent(-1, "PuTTY") GUICtrlCreateButton("Start Server", 102, 51, 100, 50) GUICtrlSetOnEvent(-1, "Start Server") GUICtrlCreateButton("Initialize", 203, 51, 100, 50) GUICtrlSetOnEvent(-1, "Initialize") GUICtrlCreateButton("Memsave", 304, 51, 100, 50) GUICtrlSetOnEvent(-1, "Memsave") GUICtrlCreateButton("Run Scan", 405, 51, 100, 50) GUICtrlSetOnEvent(-1, "Run Scan") GUICtrlCreateButton("Octave Plot", 506, 51, 100, 50) GUICtrlSetOnEvent(-1, "Octave Plot") GUICtrlCreateInput("SN_", 10, 120, 80, 20, $ES_NUMBER) GUICtrlCreateInput("SN_", 100, 120, 80, 20, $ES_NUMBER) GUICtrlCreateInput("SN_", 200, 120, 80, 20, $ES_NUMBER) GUICtrlCreateInput("SN_", 300, 120, 80, 20, $ES_NUMBER) GUICtrlCreateButton("Save SN", 400, 120, 80, 25) GUICtrlSetOnEvent(-1, "MK_DIR") Local $idTreeview = GUICtrlCreateTreeView(1, 175, 350, 200, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) Local $id485item = GUICtrlCreateTreeViewItem("485 MHz", $idTreeview) GUICtrlSetColor(-1, 0x0000C0) Local $idScanitem = GUICtrlCreateTreeViewItem("Scan", $id485item) Local $idPlotitem = GUICtrlCreateTreeViewItem("Plot", $id485item) GUICtrlCreateTreeViewItem("Set 1",$idScanitem) GUICtrlCreateTreeViewItem("Set 2",$idScanitem) GUICtrlCreateTreeViewItem("Set 3",$idScanitem) GUICtrlCreateTreeViewItem("Set 4",$idScanitem) GUICtrlCreateTreeViewItem("Set 1",$idPlotitem) GUICtrlCreateTreeViewItem("Set 2",$idPlotitem) GUICtrlCreateTreeViewItem("Set 3",$idPlotitem) GUICtrlCreateTreeViewItem("Set 4",$idPlotitem) Local $idTreeview2 = GUICtrlCreateTreeView(351, 175, 350, 200, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) Local $id985item = GUICtrlCreateTreeViewItem("985 MHz", $idTreeview2) GUICtrlSetColor(-1, 0x0000C0) Local $idScan2item = GUICtrlCreateTreeViewItem("Scan", $id985item) Local $idPlot2item = GUICtrlCreateTreeViewItem("Plot", $id985item) GUICtrlCreateTreeViewItem("Set 1",$idScan2item) GUICtrlCreateTreeViewItem("Set 2",$idScan2item) GUICtrlCreateTreeViewItem("Set 3",$idScan2item) GUICtrlCreateTreeViewItem("Set 4",$idScan2item) GUICtrlCreateTreeViewItem("Set 1",$idPlot2item) GUICtrlCreateTreeViewItem("Set 2",$idPlot2item) GUICtrlCreateTreeViewItem("Set 3",$idPlot2item) GUICtrlCreateTreeViewItem("Set 4",$idPlot2item) GUICtrlSetState($id485item, BitOR($GUI_EXPAND, $GUI_DEFBUTTON)) ; Expand the "General"-item and paint in bold GUICtrlSetState($id985item, BitOR($GUI_EXPAND, $GUI_DEFBUTTON)) ; Expand the "General"-item and paint in bold GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd EndFunc Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE Exit Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE Case @GUI_CtrlId = $GUI_EVENT_RESTORE EndSelect EndFunc ;==>SpecialEvents
  4. Thanks for the reply skysnake. Yes I believe this is primarily automation of windows tasks, as currently I complete the process manually using different programs and creating directories manually. It was automated once through VB but the PC crashed and the author doesnt work there anymore and left no source files. The parts to complete the test are all there, it is kinda disjointed and tedious when trying to show someone else how to complete the test. I did a rough outline and wanted to create the basic UI first, then fill in the user defined functions for each task next. However I know that sometimes those tasks dont finish well. ( the target SBC can hang or pause during the scan for unknown reasons ) I have used autoit for simple tasks before, but have never created my own GUI for a task involving this many different steps. So far its starting to get complicated enough I was beginning to think that if I was going to go this "deep" would I spend my time better learning more coding instead. I do enjoy this stuff either way, hence me being here on the weekend ha!
  5. I am wanting to automate a task at work, and trying to decide whether to use AutoIt or something like VB or python. I am very new at this and looking to learn a bit, but fear this task would overwhelm me if i went straight to creating the code in VB, python, C++, etc, due to having to interact with many existing programs and such. I have been digging in the help contents of AutoIt and browsing the forums and seem to have hit a snag over my head. Since I wanted each button to handle various tasks and other programs, I figured I would use Opt("GUIOnEventMode", 1). However I ran into this thread https://www.autoitscript.com/wiki/Interrupting_a_running_function and realized if any of my defined functions fail for whatever reason, the whole thing will have a hard time recovering. Also I could not seem to find how to have one button(function) set checkboxes when complete without letting the user accidentally interact with them.... I looking for a single GUI to 1. open and control programs like PuTTY, (or equivalent) Octave, the clipboard, Paint, A custom python.exe to listen to a port. 2. create file directories using input folder names, move files from the temp directory the python.exe created to the created directories, copy plot generated from octave to the clipboard to paste in paint and add a text header. 3. somehow display progress Should I even bother doing this in AutoIT or bite the bullet and go to python? Thanks for your time
×
×
  • Create New...