Leaderboard
Popular Content
Showing content with the highest reputation on 12/22/2017 in all areas
-
GUIBuilder Project
Professor_Bernd reacted to TheSaint for a topic
For quite some time now, I have had it in mind to redo and upgrade Cyberslug's GuiBuilder (also called AutoBuilder). Well, that time is finally here. Why you ask? {1} I have always preferred its no nonsense simplicity that allows you to get down and dirty with coding quickly, not hampered by other elements taking up screen space, etc. {2} It is the main reason I am still coding with AutoIt v3.3.0.0 ... the last supported version by GuiBuilder. Haven't others made attempts at updating GuiBuilder? And why not help them? {3} Yes they have. The latest probably being GuiBuilderNxt by jaberwacky, who I did assist to a minor degree. {4] While I have great respect for the work he did, and that done by others, they were not really working on the type of update I wanted. I just wanted an update, with very few extra bells & whistles. {5] I also want a version that I can maintain, that is written in a structure I understand more easily than it currently is. In short, I want it written in the style I code in. To do that, it is necessary that I set aside time, to dissect the last version of GuiBuilder (which was the one I updated to support AutoIt v3.3.0.0), so that I can more fully understand what is going on. In the past, my updates, have just been simplistic tweaks to existing code, without understanding anymore than I had to. This time, it will be entirely different. {6} I don't work well with the way other people code, and it will be enough of a struggle deciphering things as it is. But seriously, why not just use one of the existing GUI creators? {7} I am well aware of all those, but none have the simplicity and directness I want. Apart from basic GUI elements, I manually code everything or copy & paste from prolific examples I have built up over the years. I like to keep things simple, and that extends to less clutter on the desktop working environment ... less to look at. Is this project a collaborative one? {8} NO, not at this stage. It may become that, to some degree, if I get stumped by something. After I have finished the project though, it will be open to others to extend, so at that point it could become collaborative under a slightly different name ... remembering all the points I mentioned previously for my version - maintenance etc. Finally. {9} GuiBuilder or AutoBuilder as it was called at one point, was the very first GUI creator for AutoIt, which you can read about here. I would like to do justice to it and Cyberslug, the original creator, for it was a very important part of AutoIt when it first came out, and was for a very long time, part of the AutoIt install, even for a while after Koda was first included. When it was eventually superseded, I well remember Jon asking if anyone was willing to update it, so that it could be kept as part of the AutoIt install, but as an example only. Some time later, I tweaked it, so that it would work with AutoIt v3.3.0.0, but I didn't revamp the code, which was pretty much all over the shop, so ultimately it wasn't suitable as an example. So here's hoping. Especially as life has a habit of intruding and sending things awry. Wish me luck! P.S. It is my intention to report here from time to time, on how things are going .... maybe even provide some code, discuss difficulties, plans, methods, etc. Source.au3 (last version, Prototype 0.9, supports AutoIt v3.3.0.0 and Win XP) (no resources provided yet, just for reference) Screenshot of v0.91 point -
Multiple same ID names inside different DIV's
Danp2 reacted to Astralhead for a topic
nevermind - i solved it! $JSeval('$("form#sell-form button#sell-order-submit").click()') its not an "input" its a "button" thank you so much for this hint!!! Astralhead1 point -
run script from command line
Earthshine reacted to Jos for a topic
Just trying to understand how this ever would be a bug? Only thing I can imagine is that the registry setting for "Open" for fileextension .au3 doesn't pass the arguments, but can't see how this would be something wrong in autoit3. For me it's working fine so a wild guess: Somebody selected "Open With" and "always use" and created a registry entry which isn't correct. SciTEConfig can display the current settings for AutoIt3 so show me that output to check it. (Other tools/RunAutoIt3/SciTE check) Jos1 point -
kill multi proccess powershell & vbs by filename
rayane888 reacted to Earthshine for a topic
Using process explorer, look at cmdline properties. It should be in the cmdline property I did this in python. Had to because sometimes there can be multiple setup installs at once and you need to know what your target is. I’ll post Code later This is in python, you will need to convert... from os import sys sys.path.append('C:\\Python34x86\\Lib\\site-packages') import psutil import logging import Const import inspect import datetime import time def findProcess(sProcName, sProcCmdLine, nIndex, nBit, delayTimeOut): Log.Message ('findProcess - Begin()') logArgValues(inspect.currentframe()) found = False millisec = int(datetime.datetime.now().strftime('%Y%m%d%H%M%S%f')) while not found: millisec2 = int(datetime.datetime.now().strftime('%Y%m%d%H%M%S%f')) millidiff = millisec2 - millisec if (millidiff >= delayTimeOut) and (delayTimeOut != 0) : Log.Message('Process, ' + sProcName + ', not found withing defined timeout') Log.Message ('findProcess - End()') return for proc in psutil.process_iter(): pinfo = proc.as_dict(attrs=['name', 'cmdline', 'username']) if pinfo.get('name') == sProcName: cmdline = ''.join(pinfo.get('cmdline')) if (cmdline.lower() == sProcCmdLine.lower()) or (cmdline.find(sProcCmdLine)) : if pinfo.get('username').find('root'): Log.Message (' Search Name = ' + sProcName) Log.Message (' Actual Name = ' + pinfo.get('name')) Log.Message (' Srch CMDLine = ' + sProcCmdLine) Log.Message (' Found CMDLine = ' + cmdline) found = True Log.Message ('findProcess - End()') return found Mind you, you won't be able to logargvalues because that uses reflection in python. god I love that language so much. you can get so much done with so little scripting. most if that is logging... lol because I am a logging freak. I am not sure how much the Process stuff correlates to psutil, but I am sure it's close found this! this will give you access to the command line string so you can search for the file2.ps1 Also, use _ProcessList to get an array of running process to search through. find name, then search cmdline! so you will convert the following For Loop to a similar loop using _ProcessList() and that other UDF listed above and convert the following: for proc in psutil.process_iter(): pinfo = proc.as_dict(attrs=['name', 'cmdline', 'username']) if pinfo.get('name') == sProcName: cmdline = ''.join(pinfo.get('cmdline')) if (cmdline.lower() == sProcCmdLine.lower()) or (cmdline.find(sProcCmdLine)) : if pinfo.get('username').find('root'): Log.Message (' Search Name = ' + sProcName) Log.Message (' Actual Name = ' + pinfo.get('name')) Log.Message (' Srch CMDLine = ' + sProcCmdLine) Log.Message (' Found CMDLine = ' + cmdline) found = True1 point -
Maybe you can get the titles, and turn then into PID's and then close said process. The window title is different from one another yes? Look at WinGetProcess.1 point
-
Autoit-Socket-IO - Networking in AutoIt made simple!
Trong reacted to tarretarretarre for a topic
Hello. I am not dead! I suggest that everyone that uses this UDF in production, updates to this version. Version 1.5.0 (This update DOES NOT break scripts) Added AutoIt like docs under Docs\. The docs are generated so its a 1 to 1 reflection of the UDF headers. Print of documentation Added a production ready server example. Added a new method: _Io_DevDebug which will display useful information when debugging. Added a new method: _Io_SetMaxRecvPackageSize which defaults to whatever _Io_setRecvPackageSize is set to. Added a new method: _Io_setOnPrefix which defaults to _On_ Added a new default client & server event called flood. Flood occurs when exceeding the $__g_io_nMaxPacketSize. $__g_io_nMaxPacketSize is set by _Io_SetMaxRecvPackageSize Fixed the 16 parameter limit when sending data with _Io_Emit, _Io_Broadcast, _Io_BroadcastToAll and _Io_BroadcastToRoom. This works on the same premise that AutoIt's Call Does Fixed a TRUNCATION problem when receiving packages which could cause crashes! Fixed a programming error which caused $__g_ionPacketSize to reset to default 4096 if _Io_Connect or _Io_listenwere called after _Io_setRecvPackageSize Fixed _Io_setEventPreScript and _Io_setEventPostScript They didnt work. Lol. Changed how events are fired so the client cannot crash the server by sending the wrong number of parameters (This also allows for optional parameters on callbacks) Changed _Io_On. The second parameter $fCallback can now be set to null. Doing this, the function assumes that the callback is: _On_<eventName>.1 point -
TTS Text-to-Speech to .wav file using SAPI
Moonscarlet reacted to natedog102 for a topic
This small UDF helps you save any text to speech to a .wav file. UDF: #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #include-once ; #INDEX# ======================================================================================================================= ; Title .........: _TTStoWav() ; AutoIt Version : 3.3.14.2 ; Language ......: English ; Author(s) .....: natedog102 ; Modifiers .....: ; Forum link ....: https://www.autoitscript.com/forum/topic/191573-tts-text-to-speech-to-wav-file-using-sapi/ ; Description ...: TTS to .wav file using SAPI ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: _TTStoWav ; Description ...: TTS to .wav file using SAPI ; Syntax.........: _TTStoWav($sText, $sLocation[, $iRate = 1[, $iVolume = 100]]) ; Parameters ....: $sText - String you want converted to a .wav ; $sLocation - Save location + file name, example: "C:\folder\sample.wav" ; $iRate - TTS speak rate between -10 and 10 ; $iVolume - Volume of the TTS between 0 and 100 ; Return values .: Success - Returns one ; Failure - Returns zero ; Author ........: natedog102 ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _TTStoWav($sText, $sLocation, $iRate = 1, $iVolume = 100) $oFileStream = ObjCreate("SAPI.SpFileStream") If @error Then Return 0 EndIf $oFileStream.Format.Type = 39 $oFileStream.Open($sLocation, 3) $oSpeech = ObjCreate('SAPI.SpVoice') If @error Then Return 0 EndIf $oSpeech.AudioOutputStream = $oFileStream $oSpeech.Rate = $iRate $oSpeech.Volume = $iVolume $oSpeech.Speak($sText, 3) $oSpeech.WaitUntilDone(10000) $oFileStream.Close() Return 1 EndFunc ;==>_TTStoWav And here's example usage: _TTStoWav("This is a test", "C:\folder-must-exist\sample2.wav") I have never made a UDF before so I don't know if I coded it correctly or if I followed all the recommended guidelines. Apologies if I haven't. DOWNLOAD: _TTStoWav.au31 point