Jump to content

Quinch

Active Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by Quinch

  1. I have a maybe-unusual situation I'm trying to script my way around. Here's the scoop; I need to run an executable that outputs to the command window, then after it's done, run another executable that also outputs to a command window. The catch is, neither of those executables exit automatically - each one, once they're done, simply stop at one point, and the indicator where the first of them is done is something along the lines of "connecting to dbserver" or something along those lines, at which point I need to manually close it and start the next one. So, I'm thinking I could try to output the content of each executable to AutoIt's console, then have AutoIt check each second or so for that line, then kill the process and start the next step. Would that work? And if so, first, how do I dump the text to console?
  2. Hooray, it seems to work! Now let's see if I can get approval to use AutoIt at work.... But one way or another, thanks hugely for the help!
  3. Ahh, got it - I forgot to tweak the registry entry for the x64 architecture. It seems to work - so theoretically, {can someone confirm for sure?} I can run the UninstallString from the registry to launch the uninstaller? Also, another silly question - how do I call the WMI uninstall method from AutoIt?
  4. That helps in listing the stuff, but how do I get it to bring up the uninstaller? And I mean the uninstaller, unfortunately, given the dodgy methods some of this stuff hooks into the system. Edit: It doesn't seem to list all of the software either - most of it, but not all.
  5. This has probably been asked before, but I haven't had any luck finding an answer. Is there a way to use AutoIt to remove programs via Windows' "Add/Remove Programs" window? I know that there are built-in functions that should be able to uninstall applications via command line, but a lot of OEM crapware tends to be installed in kinda dodgy ways. Thus, is there a way to examine the installed programs list for a matching blacklist entry and select it {the rest I can kludge from there}?
  6. Alrighty, I'll check those out.
  7. Is it possible to have a function execute {such as guictrlread} when the enter key is pressed while in an input field, avoiding the need to press a button instead?
  8. Well, to break it down; #AutoIt3Wrapper_Res_File_Add=C:WINDOWSMediatada.wav, SOUND, MYWAV The directive and the path are straightforward enough, but what's the purpose of the the SOUND and MYWAV parameters? Global Const $SND_RESOURCE = 0x00040004 From the lines afterwards I'm guessing the $SND_RESOURCE refers to the soundfile embedded in the line above - but why that specific value?
  9. @Melba: Yeah, but again there's no explanation or context. The example goes ; Example 2 #AutoIt3Wrapper_Res_File_Add=C:WINDOWSMediatada.wav, SOUND, MYWAV Global Const $SND_RESOURCE = 0x00040004 Global Const $SND_ASYNC = 1 DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE) DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC)) For $n = 1 To 100 Sleep(15) ToolTip("Asynch! " & $n) Next But other than the path to the file itself and some sort of dll call, none of this means anything to me, plus I'm inferring that I can't actually use these embedded files with the actual AutoIt functions. For a simpler solution, is it possible to embed the files on compile, then have the script extract them to a temp folder, call on them as needed and delete on exit?
  10. @Melba: See a couple posts above.
  11. Aaannnnd there it is. I compiled with the standard "compile script" command - apparently the wrapper completely ignores the includes unless the "compile with options" option is used, so that's the catch. So with that mystery solved, how do I refer to other types of included resources, like sounds in this case?
  12. Eh, no luck. Putting in a simple; #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Res_Icon_Add=Chat Baloon.ico #AutoIt3Wrapper_Res_Icon_Add=Clapper.ico #AutoIt3Wrapper_Res_Icon_Add=Clipboard.ico For $x = 1 To 10 TraySetIcon(@ScriptFullPath, -$x) Sleep(3000) Next Just cycles through the default AU3 icons and settles on the default one until the script finishes. Am I missing something obvious?
  13. That's what I meant. It's all kind of gibberish to me {plus the example script doesn't seem to work even with fixed paths, might be system differences?} The #AutoIt3Wrapper_Res_Icon_Add or File lines seem self-explanatory enough, but how do I subsequently call on those resources? For example, let's say I want to include cheese.ico, crepes.ico and abettermousetrap.ico as well as the Iamafish.mp3 in the executable, and then use TraySetIcon and SoundPlay to put them to use at an unspecified point in the script - how exactly do I refer to each of them?
  14. Are there any guides on how to embed resources, such as additional icons or sound files, into the compiled .exe? I've looked at the example in the compiler, but I lack context for nearly all of it.
  15. No logfile {had to add a backslash there, BTW} - just an error sound and an unintelligible ~$Origin.doc temporary file, which implies that the template document is opened, but the macro isn't run. I'll start investigating the macro - in the meantime, is it possible to insert the text in a specific font and size via the script?
  16. Would that work while logged off, though? I put together a simple #include <Word.au3> $oWordApp = _WordCreate(@ScriptDir & "Origin.doc", 0, 1) Local $oDoc = _WordDocGetCollection($oWordApp, 0) $oDoc.Range.insertAfter(FileRead("test.txt")) _WordMacroRun($oWordApp, "Format") _WordDocSaveAs($oDoc, @ScriptDir & "Test_1.doc") _WordQuit($oWordApp) - and while it works when run manually, when executed with the task scheduler while logged off doesn't seem to produce any results.
  17. I need it to run on a scheduler - basically I have a bunch of lists which another script processes which then in turn I want to send to the users in a printable format. Since the lists have a fixed number of lines per page, I only need to fix the margins and font size.
  18. I'm looking for a way to create MS Word files with specific margin and font size formatting into which I can insert text via the script, without actually opening the Word application in the process. How would I go about it - the help file seems to only contain UDFs that involve interaction with Word itself, and checking the UDF forum didn't produce much help in this particular scenario.
  19. Oh, it's simple enough - it opens a file on the disk, runs a MD5 and SHA1 hash, then queries the database to see if an entry with those two values exists. If no, then add it {plus a couple of other values}. The potential bottleneck is in the sheer volume of those queries - the files themselves range between a handful of bytes to a hundred or two kilobytes, but there are routinely tens of thousands of them so I'd like to see if taking those numerous queries to memory {the database itself is about ten to twenty megabytes big} as opposed to disk would speed it up. I also realize that it would be a fairly simple job of reading all the contents of the disk database, table by table, and inserting them into the memory one, but I'm not sure whether the time spent doing that would outweigh possible time saved.
  20. Quick question - is it possible to take a SQlite database from the disk, load it into memory, work with it in-memory, then flush it back to disk? I have a script that basically runs tens of thousands of database operations and I'd like to see if removing the constant disk read/write operations from the equation would speed things up a little.
  21. Quick check - is it possible to avoid the error message window {in SciTe or a compiled eye} if the script hits a critical error? Better still, is it possible to have it execute a function, such as writing an error log etc.?
  22. When I try to execute _SQLite_Exec($database, "UPDATE threads SET " &_ "threadno = '"&StringTrimRight($t_file, 5)&"', " &_ "title = '"&$t_title&"', " &_ "poster = '"&$t_poster&"', " &_ "genres = '"&$t_genres&"', " &_ "time = '"&$t_time&"', " &_ "pages = '"&$t_pages&"', " &_ "thumbnails = '"&$t_tblist&"', " &_ "size = '"&$t_size&"' " &_ "WHERE threadno = '"&StringTrimRight($t_file, 5)&"';") I get a "missing separator after keyword" error. What am I missing?
  23. Another quick question - is it possible to set up an alias for a variable, essentially referring to it by a different name? For example, if I wanted to refer to $produce[0][4][5][7] as "$eggs" and $containers[5][7][2][4] as "$baskets" without having to update each "shorthand" variable every time its counterpart changes its value.
  24. Preferably into the latter string. Either way, it's not that big a deal, I'm just trying to keep my code as tidy as possible otherwise things get a little... unnecessarily convoluted.
  25. Yeah, that's basically what I meant. Alright, thanks anyway.
×
×
  • Create New...