Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/10/2015 in all areas

  1. Malkey

    StringLeft help!

    Using a regular expression allows control over optional spaces before and after the equal sign, and having those spaces (if they exist) not appearing in the required 'before and after' text. $text = "some = text" ; These StringRegExpReplace replaces all text matched with nothing, "". (Match the characters to be deleted) $Left = StringRegExpReplace($text, "\h*=.*$", "") ; "\h*" Match all spaces (if they exist) immediately before "=". Note:- A space is a character, and can be classified as a horizontal whitespace character. ; "=" Match the equal character. ; ".*$" Match all characters (if any exist) to the end of the test string (from immediately after "="). $Right = StringRegExpReplace($text, "^.*=\h*", "") ; "^.*" Match all characters (if any exist) from the beginning of the test string to immediately before "=". ; "=" Match the equal character. ; "\h*" Match all spaces (if they exist) immediately after "=". ; See AutoIt help file under StringRegExp for regular expression syntax. ConsoleWrite("Left: " & $Left & @LF) ConsoleWrite("Right: " & $Right & @LF) @javiwhite Another handy little trick, if you are writing your scripts in SciTE, is to type in lower case "cw ". That is, type"cw" followed by a space. This is the SciTE4AutoIt3 abbreviation for "ConsoleWrite(| & @LF) ". I use it often. The complete list of SciTe-AutoIt abbreviations can be found in the SciTe help file > under the "Index" tab > SciTE4AutoIt3-AbbreviationList.
    2 points
  2. BrewManNH

    Xp Style Skin

    ​The DLL originally was put out by a company called neemedia, they don't exist any longer but you can still find the dll around on the web.
    1 point
  3. jchd

    change variable name

    Indices of arrays are positive integers but aray elements can hold any datatype, so can hold your "bla bla". So what exactly "didn't work" ?
    1 point
  4. jchd

    _MathCheckDiv

    Infinity is not an integer nor a real value and it represents a failure here. Null can (should probably) be that value but it isn't used at all in std functions return values.
    1 point
  5. @ComSpec stuff can be a little tricky, because it needs to be exactly correct in most instances. Jewtus almost got it right. @ComSpec does not need wrapping in quotes. $CalibreDIR shouldn't need them either. If TESTbook is a path, that will probably need wrapping in quotes too, especially where spaces exist. RunWait(@ComSpec & ' /c "' & $ebook_meta & '" c:\test.mobi --title TESTbook --authors somebody', $CalibreDIR, @SW_HIDE)If you use /k instead of /c while testing (and without @SW_HIDE), you will see if errors occur. NOTE - As it is, c:\test.mobi, doesn't need quotes, but it might if it changed to something else. RunWait(@ComSpec & ' /c "' & $ebook_meta & '" "c:\test.mobi" --title TESTbook --authors somebody', $CalibreDIR, @SW_HIDE)
    1 point
  6. That's odd, when I tested just now it did not crash my script, even though I only had three pictures and not 10. What version of Excel are you using, out of curiosity? What if you do something like this first? $oCount = $oSheet.Shapes.Countto get the count and then For $i = 1 To $oCount ConsoleWrite($oSheet.Shapes($i).Name & @CRLF) Nextto get the name of each pic?
    1 point
  7. ? Run(@ComSpec & " /k """ & @ScriptDir & "\Calibre\ebook-meta.exe""" & " c:\test.mobi --title TESTbook --authors somebody")
    1 point
  8. If I remember correctly, psexec creates a hidden service, which is the only way to get something to run as SYSTEM. You cannot just do a RunAs. If I am incorrect, I am sure someone will wander by and tell me so
    1 point
  9. If I need to run as System, I often do a fileinstall of PSEXEC, and throw it in the temp directory on the machine. PSEXEC has an option to run as system but interact with the desktop of the currently logged in user.
    1 point
  10. ​Not sure which part of my post was unclear to you, but you are slowly getting on my nerves with your posting style lately, so please back off and only post in a thread when you have actually something substantial to contribute. This is a statement and does not require response in this thread and when you want to discuss anything you can do it in PM with me. Jos
    1 point
  11. Add this as the beginning of _stepper(): HotKeySet("^c") Send("^c") HotKeySet("^c", "_stepper")
    1 point
  12. Ah, got it: it's a joke, correct? Func Encrypt($Number, $key) Return $Number - 4 * $key - 47 EndFunc Func Decrypt($Number, $key) Return $Number + 4 * $key + 47 EndFuncCan you please stop that?
    1 point
  13. Exit was right, his code will show a FAIL even if the key is taken by another script or any cause of failure.
    1 point
  14. Juvigy, Not something we want to discuss here - thread locked. M23
    1 point
  15. How would Appu say? "Pleesse come again..." ...
    1 point
×
×
  • Create New...