Jump to content

MKANET

Active Members
  • Posts

    69
  • Joined

  • Last visited

MKANET's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. I've seen a lot of html-->txt strippers; however, I haven't found any Windows compatible command-line tools that just convert text files with unicode (ie, utf-8) characters to html. All I need to do is Nothing fancy (just need to detect and convert white space characters with &nbsp; and convert and detect carriage returns with <br>. Everything else as-is. I'm very limited on my autoit programming experience. So, any working examples would greatly be appreciated! Thanks in advance!
  2. The problem I'm having all along is the script just hangs. It doesn't write to the console regardless if the desktop is locked or not. This happens with the script in the OP as well as the one from guinness. I was hoping someone might know why this is happening. I obviously wouldn't ask if I hadn't already tried everything I could think of to figure it out. I dont have issues with running other autoit scripts. Both scripts below dont write any text to the console. They just produce the autoit system tray icon show shown below; and, the process stays in memory indefinitely until I kill it. I've tried it without compiling; running the au3 scripts by themselves. I've tried compiling them to exe's (both 64bit EXE and 32bit EXE). They all do the same thing. I'm using Windows 7 64bit. IsDesktopLocked.au3 #include <APIConstants.au3> #include <WinAPIEx.au3> While 1 Sleep(1000) If _isWorksatationLocked() Then ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & " - " & "workstation locked" & @CRLF) WEnd Func _isWorksatationLocked() If StringInStr(WinGetText(""), "Program Manager") <> 0 And WinGetTitle("") = "" Then Return 1 Return 0 EndFunc ;==>_isWorksatationLocked IsDesktopLocked-2.au3 #include <APIConstants.au3> #include <WinAPIEx.au3> While 1 If _IsLocked() Then ConsoleWrite('Workstation Is Locked.' & @CRLF) Else ConsoleWrite('Workstation Not Locked.' & @CRLF) EndIf Sleep(500) WEnd Func _IsLocked() Local $fIsLocked = False Local Const $hDesktop = _WinAPI_OpenDesktop('Default', $DESKTOP_SWITCHDESKTOP) If @error = 0 Then $fIsLocked = Not _WinAPI_SwitchDesktop($hDesktop) _WinAPI_CloseDesktop($hDesktop) EndIf Return $fIsLocked EndFunc ;==>_IsLocked
  3. This is a fantastic utlility, especially since it's written in my favorite scripting language. Thank you!!! I was curious why you didn't hide the Control Panel when changing the audio device.. then, after I tried to add code to hide it, I realized that it's practically impossible to hide it. I found other posts where other people tried to do the same thing but couldn't completely hide the Windows Control panel gui. If anyone is able to figure out a good way to do this, please let me know.
  4. I'm still an AutoIt novice. I'm trying to see if Autoit would be the best programming language to use for Plink.exe automation... such, automatically SSHing to a host and running a few commands.. returning results. Thanks, MKANET
  5. Could someone please take a quick look at this? Im really struggling trying to figure out what I'm missing. The other people in this thread were able to use the script(s). I'm just not sure how to use them. I'm guessing it's something very basic that I'm missing.
  6. ^Bump^ Maybe, there's a better way to detect if a workstation is locked? I dont use screensavers, so it's not as simple as detecting if the screensaver is running.
  7. I'm still an autoit novice. I'm curious why there are two separate scripts listed (NOT the psexec modified ones, just the original two listed scripts). At first I thought that the first script was a UDF. But, that doesnt seem to be the case since the second script doesnt have an include for it. I also tried combining both script snipets into one larger script and executing it; but, unfortunately there's no output from the script at all. What am I doing wrong? Thanks in advance to help me get started! Edit: I even tried making the first script as a UDF file called "locked.au3"; and, "#include "locked.au3" it from the second script. But, that doesn't work either.
  8. Jame (or who ever), I'm hoping someone can help. I'm starting to get pretty desperate. I just tried a very popular au3 based off of Vista Aero Glass 4 function. There is a very strange issue with it on my Windows machine. Instead of my Windows command prompt looking like: It looks like below: It look correct at first, but usually something as simple as changing the Windows transparency tint color or color settings "Under the Personalize window color", I see these strange transparent border to appear that dont match the rest of the window. I was hoping someone much smarter than me could figure out a way to compensate for this strange circumstance. Below is the location for the au3: Thanks so much in advance!
  9. Does anyone know why only in the last two builds, there is no transparency at all in the cmd or notepad2.exe windows. Also, the original script will have this weird visual distortion on all four borders. This happened immediately after I tried to change the general Windows 7 transparency tint color. Maybe I broke something in Windows? Maybe someone can tell whats wrong by looking at the problem below; and, offer a fix?
  10. I had read the help file before posting. The problem was I had just downloaded the portable version of Autoit3 on my machine; so, .au3 files weren't properly associated with AutoIt3.exe yet. I realized that this after I noticed that the compiled version of the au3 file would work just fine.
  11. I was trying to figure out how to do this in a Windows batch file; but gave up trying. I would like to execute the below command; and wait for it to terminate in memory, then, continue on with the script. cmdow /run /hid C:\PROGRA~1\INTERN~1\iexplore.exe http://movies.netflix.com/WiHome Ideally, I'd like to have autoit hide that window; which may reduce the complexity of the external command. However, I don't know how to do that Maybe someone where knows an nice way to do this.
  12. I stopped playing with autoit for just a 3 months and I already forgot the basics. Why wont the below work? Send("$CmdLine[1]") All I want to do is send a paramater to the script will emulate those key presses. If I try to send a paramater to that script, the parameter is ignored and the string of characters Send("$CmdLine[1]") are sent to the console.
  13. wraithdu, I really appreciate the time you took to making this code. The provided example works perfectly right out of the box! All I did was build a x64 GUI exe. This utility is actually irriplacable; considering there are no compiled tiny, light-weight Win32/64 executables do this and that are currently available for download on the Internet. This should be a Windows "must-have" utility!
  14. Autoit console app like the example above...
  15. Yes. I saw the same warning on MSDN. There are rare circumstances where this can be very useful and effective though. As mentioned earlier, I don't have any issues successfully doing this manually via Process Explorer's GUI; and, I dont have full knowledge of what the thread is doing. But, I do know that the band-aid solution actually works pretty well (no more weird Utilization caused by that thread... and system is perfectly stable for several days/weeks of uptime). Im just looking for a way to automate this via command line.
×
×
  • Create New...