All Activity
- Past hour
-
String Sender GUI: Is There a Better Way?
Nine replied to wiretwister's topic in AutoIt GUI Help and Support
When you post code, please use the method shown in the link. What do you mean by erratic ? Could you make a gif that shows it ? Or describe in more details the faulty behavior. ps. I agree that the SendKeyDelay is way too high. Probably something is interrupting or disturbing the Send. You could use my UDF to block input while the send is running (see my signature for it). pps. another thing, using alt+x may also cause problems. Alt is often use to start/show menu in many applications. You may want to change your hot keys to something else. -
String Sender GUI: Is There a Better Way?
wiretwister replied to wiretwister's topic in AutoIt GUI Help and Support
Thank you for responding. I don't think the problem involves SendKeyDelay. The script behavior is erratic with or without this. The part of the script that you show in your reply is the loop that processes User input (GUI MessageLoop Mode). As far as I can tell, it seems to respond as intended to Alt-1, Alt-2, Alt-3, Alt-4, Alt-5 and CLOSE keyboard inputs. It might be poorly written, but it's a basic part of a GUI script. - Today
-
AutoItHelp v3.3.16.1 with external CSS loading
Jos replied to argumentum's topic in AutoIt General Help and Support
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. -
SciTE- jump to include file function
Jos replied to maniootek's topic in AutoIt Technical Discussion
Yes... in the current Beta version. -
SciTE- jump to include file function
maniootek replied to maniootek's topic in AutoIt Technical Discussion
Jumping to variable declaration is also possible with lua? -
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
- 2 replies
-
- ocr
- text recognition
-
(and 2 more)
Tagged with:
-
I have found solution for my problem i tried to solve this with one value but if i use separate valule fo each radios in group its work #include <GUIConstantsEx.au3> $Radio_click1=IniRead("click_ini.ini", "radios", "Radio_1 ","error") $Radio_click2=IniRead("click_ini.ini", "radios", "Radio_2 ","error") $Radio_click3=IniRead("click_ini.ini", "radios", "Radio_3 ","error") Example() Func Example() GUICreate("My GUI group") ; will create a dialog box that when displayed is centered GUICtrlCreateGroup("Group 1", 190, 60, 90, 140) $R1=GUICtrlCreateRadio("Radio1", 210, 90, 50, 20) GUICtrlSetState(-1, $Radio_click1) $R2=GUICtrlCreateRadio("Radio2", 210, 120, 60, 50) GUICtrlSetState(-1, $Radio_click2) $R3=GUICtrlCreateRadio("Radio3", 210, 150, 70, 80) GUICtrlSetState(-1, $Radio_click3) GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group 1 GUISetState(@SW_SHOW) ; will display an empty dialog box ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example and in Ini file only one value can has 1. [radios] Radio_1 =1 Radio_2 =0 Radio_3 =0 Mixing 1 with 0 i can set radio which i want. For my purposes is enough. Thanks for your help!
-
AutoItHelp v3.3.16.1 with external CSS loading
Jos replied to argumentum's topic in AutoIt General Help and Support
Just had a look at the source of this example helpfile and see that all 3 css files are already included in the helpfile, and they are all 3 included in each of the example functions html files. Think only the default.css is required internally and the others could be removed as they are overridden by the JS logic....right? -
AutoItHelp v3.3.16.1 with external CSS loading
Jos replied to argumentum's topic in AutoIt General Help and Support
Agree, so that means that the default for the autoit.css should be the "%localappdata%\AutoIt v3" folder. But that is not what is used for a portable installation, so for portable, the directory for autoit.css should be the Autoit.chm directory itself. We shouldn't use the SciTE directory as there is no relation to SciTE for the AutoIt3 helpfile. So guess the appropriate search sequence for autoit.css should be: I meant to say that the "model css files" in the extras directory and then one can point to them in the autoit.css with the line: @import "file://C:/Program Files (x86)/AutoIt3/Extras/helfile_css/default.css" This will also make it easy for us if we want to make this an option in SciTEConfig as we know the autoit.css location and we know the model css files location. Agree / Thoughts? -
i would save and load the states of the radio buttons in this way: #include <GUIConstantsEx.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 259, 111, 192, 124) Global $radio[6] GUICtrlCreateGroup("Group 1", 0, 0, 90, 110) $radio[0] = GUICtrlCreateRadio("Radio0", 14, 19, 71, 20) $radio[1] = GUICtrlCreateRadio("Radio1", 14, 46, 71, 20) $radio[2] = GUICtrlCreateRadio("Radio2", 14, 72, 71, 20) GUICtrlCreateGroup("", -1, -1, 0, 0) GUICtrlCreateGroup("Group 2", 104, 0, 90, 110) $radio[3] = GUICtrlCreateRadio("Radio0", 114, 19, 71, 20) $radio[4] = GUICtrlCreateRadio("Radio1", 114, 46, 71, 20) $radio[5] = GUICtrlCreateRadio("Radio2", 114, 72, 71, 20) GUICtrlCreateGroup("", -1, -1, 0, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $state = Int(IniRead("radio.ini", "radiobutton", "1", 0)) $state1 = Int(IniRead("radio.ini", "radiobutton", "2", 0)) GUICtrlSetState($radio[$state], $gui_checked) GUICtrlSetState($radio[$state1], $gui_checked) WinSetTitle ($Form1,"","Rbutton: " & $state & "/" & $state1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case Else For $x = 0 To 2 If $nMsg > 0 And $nMsg = $radio[$x] Then IniWrite("radio.ini", "radiobutton", "1", $x) WinSetTitle ($Form1,"","Rbutton: " & $x) $state=$x EndIf Next For $x = 3 To 5 If $nMsg > 0 And $nMsg = $radio[$x] Then IniWrite("radio.ini", "radiobutton", "2", $x) $state1=$x EndIf Next EndSwitch WinSetTitle ($Form1,"","Rbutton: " & $state & "/" & $state1) WEnd
-
Yes it is as you wrote. With group with 2 radios i use numbers to set which of radios is checked. In group of 3 radios i can set only state one radio in group with numbers so tried to set state by other ways. Nothing above works unfortunately.
-
orok reacted to a post in a topic: Read controlID from INI file
-
AutoItHelp v3.3.16.1 with external CSS loading
argumentum replied to argumentum's topic in AutoIt General Help and Support
I use c:\utilities as the install folder but the default folder is an almost read-only. Need admin rights to make changes. There are 2 product coming out of this site, AutoIt3 and SciTE4AutoIt3. They both install by default in a protected path. All the files that would be user level read/write goes to the users AppData folder. Therefore a css goes in the protected folder with an @import declaration pointing to the file in AppData, and in the AppData where all the common read/write is done, the 2nd css is the one that is modified. Basically conforming with everything else. Hence the inability of placing these css files at AutoIt3/Extras. Since I strongly oppose using ActiveX in any chm due to trust issues, the only technologies available would be JS and CSS, and those limitations force the lack of independence from standard distribution. So, the AutoIt3 installer uses the light version of SciTE. Need not change a thing in the installer as those users are either too clueless or using a different editor. Those with a different editor would welcome some information about all this css stuff, thus the reason why an entry in the help file describing it's workings would be welcomed. And for that I as thinking of the FAQ area. Also, since the installer that would add the AutoIt.css would be the one that installs SciTE4AutoIt3, it would be expected to have all it's files in that same folder and the reason to first look there. The second path to look at is the chm's folder for those with a different editor that would plan to customize the look and feel to match that of the editor. One that comes to mind right away is ISN but Notepad++ also comes with a plethora of color schemes. Then we have those with portable setups like myself, and those are fine too. Lest I forget anything, that's that. I hope I have saved you from guessing what I was thinking of. PS: I have not dedicated time to look at "Scite Config" yet. But as we discussed earlier, is not a big deal. ( shouldn't be, in my mind anyway ) -
_Inetgetsource doesn't work for this yahoo url
SOLVE-SMART replied to BlazerV60's topic in AutoIt General Help and Support
Hi @BlazerV60, how does your output look like? What do you search exactly? This site uses iframes on several sections - this might be a problem. Which tool(s) do you use for the web scraping? Are you only interested in getting the whole page content (source) ? Then you parse the needed data? I guess it could be better to only get the expected data directly (e.g. WebDriver (au3WebDriver project) or by UIA). How? Only the maintainer(s)/developer(s) of the page know if there were changes. I am interested in helping you. So please provide more context 🤝 . Best regards Sven- 1 reply
-
- web scraping
- inetgetsource
-
(and 2 more)
Tagged with:
-
SOLVE-SMART reacted to a post in a topic: read XML file
-
argumentum reacted to a post in a topic: AutoItHelp v3.3.16.1 with external CSS loading
-
AutoItHelp v3.3.16.1 with external CSS loading
Jos replied to argumentum's topic in AutoIt General Help and Support
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. -
Hi Danyfirex, Good to see you are still developing in AutIT 🙂 I see that this Library is using ONNX Open Neural Network Exchange AI (https://onnx.ai/) Correct ? Can you tell a bit more why we should use this library compared to other conventional OCR libraries ? It is better, faster more reliable, ... PS : I use OCR on a daily basis for different purposes. Thanks
- 2 replies
-
- ocr
- text recognition
-
(and 2 more)
Tagged with:
-
save the elapsed time of my timer.
Jos replied to angel83's topic in AutoIt General Help and Support
Looks like a very familiar question of 2 previous topics closed..... right? Thought we discussed this both in open forum as well as PMs? -
Trouble with Floyd-Steinberg dithering
Werty replied to Werty's topic in AutoIt General Help and Support
If it was a question then sure, please go ahead.- 13 replies
-
- dithering
- floyd-steinberg
-
(and 1 more)
Tagged with:
-
Trouble with Floyd-Steinberg dithering
UEZ replied to Werty's topic in AutoIt General Help and Support
The color reducing code is based on the GDIPlus function GdipGetImagePalette which is unfortunately not the best algorithm to choose the best colors. Additionally it doesn't utilize the full color range. For example if you create a 8 bit bitmap it doesn't use the full color scope of 256 colors. The color formats which I use is 2-bit, 4-bit and 8 bit -> 2, 16 and 256 colors. Nothing in between will be calculated. @AndyG that is the reason why it looks better when $iColors is > 16. It will set it to 256 color bitmap (8 bit). @Werty the DLL is using heavily GDIPlus functions and the For/Next loops are much faster in Freebasic than in Autoit. In the DLL I added also a function call "_GDIPlus_BitmapCreateGreyscale" which converts the image to 256 greyscale colors using (iR * 213 + iG * 715 + iB * 72) / 1000 calculation. Let me add your "fake"grey to the DLL...- 13 replies
-
- dithering
- floyd-steinberg
-
(and 1 more)
Tagged with:
-
AutoItHelp v3.3.16.1 with external CSS loading
argumentum replied to argumentum's topic in AutoIt General Help and Support
@Jos, this is a test chm Testing123(2024.04.16).zip Place this test file in the AutoIt folder where the AutoIt.chm is at. Make a file called AutoIt.css with the CSS in it or with an import line, like: @import "file://C:/Users/<myUsername>/AppData/Local/AutoIt v3/<don't know yet>/Buuf.css"; The CSS loading order is: First try the SciTE's folder. If that fails try the AutoIt's folder. If that also fails then use the default.css from within the chm itself. On WinXP, no external CSS will be loaded. The Emulation has to be IE11 for this to work. Win7 onwards shows to work just fine. In case of questions go to https://www.autoitscript.com/forum/index.php?showtopic=211676 Tested on Win XP,7,10,11 The idea is that users of SciTE will have all the goodies we're putting together but standard release and other editors have to be able to use the help file too. ( obviously, I know ) In any case, my question is, where do you find fitting to stash the CSS file within the path(s) pattern for the full release of SciTE ? Also, the FAQ in the help file. Should it have an entry of how to use the external css optional feature ? No hurries. Just thinking ahead. -
Hello, I am looking for a way to save the elapsed time of my timer. When you I close timer.au3 EXAMPLE: 1:52 minutes and seconds when you run timer.au3 again, it continues where it left off. If you can give me an example or where to look in advance, thank you
-
Werty reacted to a post in a topic: Trouble with Floyd-Steinberg dithering
-
Hello, I'm creating a program to help me analyze stocks. So a big part of my tool is web scraping. As of yesterday, the _INetGetSource command seemed to stop working for the page that tells me a stock's info which is on yahoo finance (I'll ref the link below). Here is the simplified version of the code. #include <Inet.au3> ConsoleWrite(_INetGetSource('https://finance.yahoo.com/quote/AAPL')) It's strange because before yesterday, it was pulling the code from those pages correctly. The _INetGetSource will work for most other yahoo pages, even the finance home page (finance.yahoo.com) but not the page that shows me a specific stock's info. Does anyone know why it stopped giving me the source code for those pages?
- 1 reply
-
- web scraping
- inetgetsource
-
(and 2 more)
Tagged with:
-
Trouble with Floyd-Steinberg dithering
Werty replied to Werty's topic in AutoIt General Help and Support
How about going the other way, more than 256 grays... Guess how many grays this image has. Or make your own... #Include <GDIPlus.au3> HotKeySet("{ESC}", "_exit") _GDIPlus_Startup() $Image = _GDIPlus_BitmapCreateFromFile("image.png") $Width = _GDIPlus_ImageGetWidth($Image) $Height = _GDIPlus_ImageGetHeight($Image) $GUI = GUICreate("AmazingGrays", $Width, $Height);, -1, -1) GUISetState() $Graphics = _GDIPlus_GraphicsCreateFromHWND($Gui) _GDIPlus_GraphicsDrawImageRect ($Graphics,$Image, 0, 0, $Width, $Height) $Bitmap = _GDIPlus_BitmapLockBits($Image, 0, 0, $Width, $Height, BitOR($GDIP_ILMWRITE, $GDIP_ILMREAD), $GDIP_PXF32ARGB) $Pixels = DllStructCreate("dword[" & $Width * $Height & "];", DllStructGetData($Bitmap, "Scan0")) For $Loop = 1 To $Width * $Height $Pixel = DllStructGetData($Pixels, 1, $Loop) $Red = Dec(StringMid(Hex($Pixel, 6), 1, 2)) $Green = Dec(StringMid(Hex($Pixel, 6), 3, 2)) $Blue = Dec(StringMid(Hex($Pixel, 6), 5, 2)) Local $R = 0, $G = 0, $B = 0 $LUMA = (($Red*.3) + ($Green*.59) + ($Blue*.11)/3) $AGrays = $LUMA - Int($LUMA) $LUMA = Int($LUMA) Switch StringFormat("%.2f", $AGrays) Case .05 To .18 $B = 1 Case .19 To .34 $G = 1 Case .35 To .50 $B = 1 $G = 1 Case .51 To .66 $R = 1 Case .67 To .82 $R = 1 $B = 1 Case .83 To .95 $R = 1 $G = 1 EndSwitch DllStructSetData($Pixels, 1, "0xFF" & Hex($LUMA + $R, 2) & Hex($LUMA + $G, 2) & Hex($LUMA + $B, 2), $Loop) Next _GDIPlus_BitmapUnlockBits($Image, $Bitmap) _GDIPlus_GraphicsDrawImageRect($Graphics, $Image, 0, 0, $Width, $Height) Do Until GUIGetMsg() = - 3 Func _exit() Exit EndFunc It's using "near gray" colors, like (155,155,154) looks gray eventhough it's not pure, also called "pseudo gray" or "fake gray", good for photographers that wanna print high resolution images as grayscale on big posters. /edit Comparison between standard averaging on the left that came to 246 grays and AmazingGrays on the right came to 1512 grays.- 13 replies
-
- dithering
- floyd-steinberg
-
(and 1 more)
Tagged with:
-
Trouble with Floyd-Steinberg dithering
Werty replied to Werty's topic in AutoIt General Help and Support
Thanks, awesome work as usual, unfortunately I know nothing about freebasic and kinda need it to be "my own" code, with help and inspiration from others ofcourse, this is just a small part of a bigger project, but I will certainly be using it till I get around to attempting making a c-dll, that will include other stuff also, I've just been busy with other parts after getting this atleast working so I could get on with other stuff. But damn it's fast.- 13 replies
-
- dithering
- floyd-steinberg
-
(and 1 more)
Tagged with:
- Yesterday
-
water reacted to a post in a topic: Read controlID from INI file
-
Thanks Andreik! I understand better how 'Microsoft.XMLDOM' works. As for this 'regex' version, I will try to understand how it works for my personal culture.
-
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