Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/17/2024 in all areas

  1. First, I must sincerely apologize to @paw for being so stubborn in refusing to incorporate the notion of injection into my UDF. After careful consideration, I must admit my mistake. It was a very good idea, and I should have agreed to it. But to keep the UDF completely safe, it will be possible to authorize injection or refuse it. When the injection is authorized, the Send and Mouse* functions will operate normally even if manual inputs are rejected. New version available
    2 points
  2. btw. Used several times today. It worked like a charm.
    1 point
  3. When you post code, use the method shown in the link. Put all statements into a func and link the function with a HotKeySet , something like this : HotKeySet("{F8}", DelCommand) While Sleep(100) WEnd Func DelCommand() Send("+{SPACE}") ;select row Sleep(100) Send("{F10}") ;opens hotkey menu Sleep(100) Send("h") ;opens home menu Sleep(100) Send("d") ;opens delete menu Sleep(100) Send("r") ;deletes row EndFunc ;==>DelCommand ps. you could also use Excel UDF, to perform those tasks instead of sending keys, which would make your script way more reliable.
    1 point
  4. Just realized that using the %localappdata% is probably not an option without an activex module, as those environment variables aren't available to the JS code in the helpfile. When that is the case we are forced to any relative path to the helpfile and those are by default read only when the installer is used.
    1 point
  5. I really don't know much about which one is better only that it gave me better results than tesseract in a project I was doing so that's why I made the wrapper. Saludos
    1 point
  6. Wouldn't it make more sense to put this into the AutoIt3 installer (when all agree this is the right thing for the helpfile)? In that case, I guess the best place for the different input css file schemas would be in the subdirectory of AutoIt3/Extras and the active css in the same directory as the Helpfile itself. So looking at the readme in the ZIP: I am not sure why you would want to check the SciTE folder at all as you want to make this generically available and not SciTE specific? Will have a closer look later today/tomorrow when I have some time to test.
    1 point
  7. Andreik

    read XML file

    Local $oXML = ObjCreate('Microsoft.XMLDOM') If IsObj($oXML) Then $oXML.load("PrixCarburants_test.xml") $oXML.setProperty('SelectionLanguage', 'XPath') $oNodes = $oXML.selectNodes('/pdv_liste/pdv') For $oNode In $oNodes ConsoleWrite('Latitude: ' & $oNode.getAttribute('latitude') & @CRLF) ConsoleWrite('Longitude: ' & $oNode.getAttribute('longitude') & @CRLF) ConsoleWrite('CP: ' & $oNode.getAttribute('cp') & @CRLF) ConsoleWrite('Address: ' & $oNode.selectSingleNode('adresse').text & @CRLF) ConsoleWrite('Ville: ' & $oNode.selectSingleNode('ville').text & @CRLF) ConsoleWrite('Horaires: ' & @CRLF) $oJours = $oNode.selectNodes('horaires/jour') For $oJour In $oJours $oHoraire = $oJour.selectSingleNode('horaire') $sJour = $oJour.getAttribute('nom') $sOverture = $oHoraire.getAttribute('ouverture') $sFermeture = $oHoraire.getAttribute('fermeture') ConsoleWrite($sJour & ' (Ouverture: ' & $sOverture & ', Fermeture: ' & $sFermeture & @CRLF) Next $oServices = $oNode.selectNodes('services/service') For $oService In $oServices ConsoleWrite('Service: ' & $oService.text & @CRLF) Next $oPrixCol = $oNode.selectNodes('prix') For $oPrix In $oPrixCol $sPrixNom = $oPrix.getAttribute('nom') $sPrixId = $oPrix.getAttribute('id') $sPrixMaj = $oPrix.getAttribute('maj') $sPrixVal = $oPrix.getAttribute('valeur') ConsoleWrite('Prix: ' & $sPrixNom & ' (ID: ' & $sPrixId & ', Maj: ' & $sPrixMaj & ', Valeur: ' & $sPrixVal & @CRLF) Next ConsoleWrite(@CRLF) Next Else ConsoleWrite('Invalid XML object.' & @CRLF) EndIf Or a regex version: $sData = FileRead('PrixCarburants_test.xml') $aPDV = StringRegExp($sData, '(?is)(<pdv (?:.*?)<\/pdv>)', 3) If IsArray($aPDV) Then For $Index = 0 To UBound($aPDV) - 1 $vLatitude = StringRegExp($aPDV[$Index], '(?i)<pdv(?:.*?)latitude="(\d+)"(?:.*?)>', 3) If Not @error Then ConsoleWrite('Latitude: ' & $vLatitude[0] & @CRLF) $vLongitude = StringRegExp($aPDV[$Index], '(?i)<pdv(?:.*?)longitude="(\d+)"(?:.*?)>', 3) If Not @error Then ConsoleWrite('Longitude: ' & $vLongitude[0] & @CRLF) $vCP = StringRegExp($aPDV[$Index], '(?i)<pdv(?:.*?)cp="(\d+)"(?:.*?)>', 3) If Not @error Then ConsoleWrite('CP: ' & $vCP[0] & @CRLF) $vAdresse = StringRegExp($aPDV[$Index], '(?i)<adresse>(.*?)<\/adresse>', 3) If Not @error Then ConsoleWrite('Adresse: ' & $vAdresse[0] & @CRLF) $vVille = StringRegExp($aPDV[$Index], '(?i)<ville>(.*?)<\/ville>', 3) If Not @error Then ConsoleWrite('Ville: ' & $vVille[0] & @CRLF) ; Horaires $aHoraires = StringRegExp($aPDV[$Index], '(?is)(<jour.*?<\/jour>)', 3) If IsArray($aHoraires) Then ConsoleWrite('Horaires: ' & @CRLF) For $iJour = 0 To UBound($aHoraires) - 1 $vJourNom = StringRegExp($aHoraires[$iJour], '(?i)nom="(.*?)"', 3) If Not @error Then ConsoleWrite(' ' & $vJourNom[0] & @CRLF) $vOuverture = StringRegExp($aHoraires[$iJour], '(?i)ouverture="(.*?)"', 3) If Not @error Then ConsoleWrite(@TAB & 'Ouverture: ' & $vOuverture[0] & @CRLF) $vFermeture = StringRegExp($aHoraires[$iJour], '(?i)fermeture="(.*?)"', 3) If Not @error Then ConsoleWrite(@TAB & 'Fermeture: ' & $vFermeture[0] & @CRLF) Next EndIf ; Services $aServices = StringRegExp($aPDV[$Index], '(?is)<service>(.*?)<\/service>', 3) If IsArray($aServices) Then For $iService = 0 To UBound($aServices) - 1 ConsoleWrite('Service: ' & $aServices[$iService] & @CRLF) Next EndIf ; Prix $aPrix = StringRegExp($aPDV[$Index], '(?is)<prix(.*?)\/>', 3) If IsArray($aPrix) Then For $iPrix = 0 To UBound($aPrix) - 1 $vPrixNom = StringRegExp($aPrix[$iPrix], '(?i)nom="(.*?)"', 3) If Not @error Then ConsoleWrite('Prix: ' & $vPrixNom[0] & @CRLF) $vPrixID = StringRegExp($aPrix[$iPrix], '(?i)id="(.*?)"', 3) If Not @error Then ConsoleWrite(' ID: ' & $vPrixID[0] & @CRLF) $vPrixMaj = StringRegExp($aPrix[$iPrix], '(?i)maj="(.*?)"', 3) If Not @error Then ConsoleWrite(' Maj: ' & $vPrixMaj[0] & @CRLF) $vPrixValeur = StringRegExp($aPrix[$iPrix], '(?i)valeur="(.*?)"', 3) If Not @error Then ConsoleWrite(' Valeur: ' & $vPrixValeur[0] & @CRLF) Next EndIf ConsoleWrite(@CRLF) Next EndIf
    1 point
  8. Nine

    Read controlID from INI file

    Well since radio buttons are mutually exclusive, there is no need to write the state of all radios, you just want the one checked within each group. I believe OP wants to have multiple groups of radio buttons. So the ini file would list the one button checked within each group. I agree there is other ways to perform what OP wants, and using actual names is not the best.
    1 point
  9. @Werty I updated Just check out the example _GDIPlus_BitmapApplyFilter_Indexed.au3. This time I added also a x64 DLL but not fully tested. The result should look like this here with Floyd-Steinberg dithering:
    1 point
×
×
  • Create New...