Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2013 in all areas

  1. Here is a script which removes diacritic marks. It appears to work, but I'm not entirely sure what is happening. There was a certain amount of trial and error involved in writing this, so I would like someone with more experience to look at it. It feels like a clumsy technique I'm using. Diacritics should be removed from both extended ansi and from unicode. I couldn't find a way to do this without calling _WinAPI_MultiByteToWideChar twice. #include <WinAPI.au3> #region - Example Local $sTestString = "" ;For $i = 192 To 255 ; $sTestString &= Chr($i) ; extended latin from Windows 1252 code page ;Next For $i = 256 To 382 $sTestString &= ChrW($i) ; Extended latin alpha characters Next Local $newString = _StripDiacriticMarks($sTestString) MsgBox(0, "", $sTestString & @LF & @LF & $newString) #endregion Func _StripDiacriticMarks($sText) If Not IsString($sText) Then Return SetError(1, 0, $sText) Local $sCurrChar, $sSplitChar, $sElement, $sNewString = "" For $i = 1 To StringLen($sText) $sCurrChar = StringMid($sText, $i, 1) $sSplitChar = _WinAPI_MultiByteToWideChar($sCurrChar, 3, $MB_COMPOSITE) $sElement = DllStructGetData($sSplitChar, 1) If StringIsAlpha($sElement) Then $sCurrChar = $sElement ElseIf DllStructGetSize($sSplitChar) > 4 Then $sSplitChar = _WinAPI_MultiByteToWideChar($sCurrChar, 3, $MB_COMPOSITE, True) For $j = 1 To Stringlen($sSplitChar) $sElement = StringMid($sSplitChar, $j, 1) If StringIsAlpha($sElement) Then $sCurrChar = $sElement ExitLoop EndIf Next EndIf $sNewString &= $sCurrChar Next Return $sNewString EndFunc I'm sure I don't need all this code.
    1 point
  2. Is the full path to your ftp folder "my server/windowsticker" I never use ftp, but it looks like that might be the problem. Do you need those double slashes perhaps "my server//windowsticker" Maybe trailing slashes "my server//windowsticker//" or "my server/windowsticker/"
    1 point
  3. Somerset

    Is AutoIT perfect?

    What'cha you talking about, Willis?
    1 point
  4. Well, I would guess that you don't have any network drives attached, do you? Local $iScope = 0 ; 0 - Enumerate all currently connected resources This is only a basic example enumerating just one node. Next step would be to create nested function calls, first with $iScope = 1, then pass the resulting $tagNETRESOURCE structure to the next _WinNet_OpenEnum() call to enumerate the child resources of that one...
    1 point
  5. 1 point
  6. Perhaps _WinAPI_EnumChildWindows() <- WinAPIEX UDF <- Example Scripts Forum.
    1 point
  7. spudw2k

    InputBox Password

    If you are up for learning new things, I highly recommend looking at the _Crypt funcs in the help file. There is a simple, elegant example for a calculated hash / password mechanism (Much more secure than embedding a cleartext password).
    1 point
  8. You can try with something like this as alternative: Func _StripDiacriticMarks($sText) Local $oMessageStream = ObjCreate("ADODB.Stream") If @error Then Return SetError(1, 0, $sText) Local $sOut With $oMessageStream .Type = 2 .charset = "us-ascii" .Open() .WriteText($sText) .Flush() .Position = 0 $sOut = .ReadText() .Close() EndWith Return $sOut EndFunc
    1 point
  9. Firstly the problem wasn't fixed in the UDFs and secondly the beta release cycle isn't monthly. This is down to the Devs to decide when AutoIt beta is ready for testing. For now my advice would be copy the screen capture function to your script with the proposed fix by Melba23 & KaFu and call it something like... _ScreenCapture_FixedByMelbaAndKaFuInTheYearOf2013_OhAndguinnessIsAwesomeToo(). You get the idea 0_-!
    1 point
  10. Jos

    voLwy

    Zapped voLwy for calling me names in a PM after locking a thread. Simply will not tolerate this behaviour . Jos
    1 point
  11. JohnOne

    Is AutoIT perfect?

    Mechaflash you need to pack your crack pipe away, think you've had enough
    1 point
  12. Oh Okay. I see it as a minor feature, so if you don't mind I will update at the end of April. Is that alright?
    1 point
  13. seangriffin

    Java UDF

    Thanks everyone for the positive feedback already (after only posting this last night!) Good call Valuater. I'm going to try and do this using NSIS. I was hoping this step wouldn't be necessary, but I've found (on my computer anyway) that after installing the Java Access Bridge it hadn't automatically placed the Bridge into all the Java Runtime Environments (JREs) on my computer (like it said it would). Maybe it's a bug in V2.0.1 of the Bridge. At least my own installer should get the job done.
    1 point
×
×
  • Create New...