Jump to content

Leaderboard

Popular Content

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

  1. inspired by AutoIt Help v3.3.16.1 with external CSS loading v1 AutoItHelp.7z v2 add icons, search and open example AutoItHelp_v2.7z  
    3 points
  2. New Version -- v0.1.0 ** Added ** Spell Checker now can mark lines with misspelled words using a Margin marker also. Single Word check now will check the currently selected word. Script check now will be restrained to a selected portion if a selection exists. ClearSpChk function will now clear only a selection if one exists. ClearSpChk function now also clears the new Margin Markers also. Selected words that are single word spell checked can also be replaced using the drop down. ** Fixed ** Some apostrophied words not being correctly selected, such as "I'll". Some markings incorrectly included as part of the word at the beginning or end, such as dashes, quotations etc. Two if blocks in the program were incorrectly testing for nill, instead of nil. ** Changed ** Rewrote the word recognition method to work better and quicker. Seconds read out at end of Script is now maximum 4 characters long. Words to spell check are now directly written to the file, instead of to a table and then to a file, saving several milliseconds.
    1 point
  3. BugFix version - 27 Dec 23 Fixed: No default value set for the MaxWidth parameter - took 12 years for someone to notice it! New UDF and new examples below and in zip. I just realised that although I have posted versions of this UDF many times in Help topics, I had never actually posted a "final" version here in Example scripts - better late than never, I suppose! StringSize takes a text string and calculates the size of label required to hold it as well as formatting the string to fit. Now AutoIt will, of course, size a label automatically to fit a text string, but it will not format the string in any way - what you use as the string is what you get in the label. If you do set any label sizes the text will be wrapped, but you can only determine the correct size of the label by trial and error. StringSize will, however, reformat the string to fit in a given width and tell you the required height so that you can read it all - whatever the font type or size - and you do not have to do the formatting beforehand. Here is a simple example to show what I mean (you need the UDF in the same folder for all the examples): And here is an example showing how StringSize can deal with different fonts and text sizes: You can see that the GUI is perfectly sized each time and that the button is always the right size and in the right place. StringSize returns an array which contains the formatted text to display and the size of the label needed to display it. All you need to do is to use the array elements when you create your label. Try changing the values in $aFont and $aSize if you want to try you own favourites - but beware, StringSize will return an error if you make the size so large that it cannot fit a word into the label width. NEW A more complex example showing how formatted and unformatted text can be sized correctly. The width of GUI holding the unformatted text varies randomly in width (the current value is displayed at top right): NEW And a final example showing how you can get your text in the largest possible font to fit in a given space: Finally here is the UDF itself: And all 5 files in zip format: StringSize.zip I hope you find this useful - I certainly do. M23
    1 point
  4. Hi... my crystal ball is currently out of commission, so you will need to provide more details than "not working". 😏Also, I don't know what you mean by "business cloud". Are you behind a firewall or proxy? What do you get for console output when you run the following? #include "wd_core.au3" #include "wd_helper.au3" $_WD_Debug = $_WD_DEBUG_Full _WD_UpdateDriver('firefox') This is what I see --     _WD_GetBrowserPath ==> Success [0 / 2] : Parameters: Browser=firefox     _WD_GetBrowserVersion ==> Success [0 / 2] : Parameters: Browser=firefox     _WD_GetWebDriverVersion ==> Success [0 / 0] : Parameters: Dir=c:\Users\danpo\OneDrive\Documents\GitHub\WD Test\ EXE=geckodriver.exe     __WD_GetLatestWebdriverInfo ==> Success [0 / 0]     _WD_DownloadFile ==> Success [0 / 0] : Parameters: URL=https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-win64.zip Dest=C:\Users\danpo\AppData\Local\Temp\webdriver_snrfuls.zip Options=Default     __WD_UpdateExtractor ==> Success [0 / 0]     _WD_UpdateDriver ==> Success [0 / 0] : DriverCurrent = 0.32.1 : DriverLatest = 0.33.0 There aren't any special ports required. Internally, the InetRead function is used to download the webdriver.
    1 point
  5. @kctvt : You may also check this one from @Nine : https://www.autoitscript.com/forum/topic/203759-is-there-a-way-to-get-time-online-because-the-times-on-the-computer-are-subject-to-change/?do=findComment&comment=1463129 #include <Constants.au3> #include <Date.au3> ;Local $String = BinaryToString(InetRead ("http://worldtimeapi.org/api/timezone/America/Toronto.txt",1)) Local $String = BinaryToString(InetRead ( "http://worldtimeapi.org/api/timezone/Europe/Amsterdam.txt",1)) ;MsgBox (0,"",$String) Local $Time = StringRegExp ($String,'datetime: (.+?)T(\d+:\d+:\d+)', $STR_REGEXPARRAYMATCH) MsgBox ($MB_SYSTEMMODAL,"",$Time[0] & " " & $Time[1])
    1 point
×
×
  • Create New...