Jump to content

Search the Community

Showing results for tags 'expression'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 6 results

  1. CronToTime.au3 UDF converts a Unix Cron expression into a DateTime string. On Unix systems a Cron expression made of five fields separated by blanks/tabs followed by a shell command to execute. e.g. 15-30 2,3,4,5 29 1-12 0-6 reboot +------------- minute (0 - 59) ¦ +------------- hour (0 - 23) ¦ ¦ +------------- day of month (1 - 31) ¦ ¦ ¦ +------------- month (1 - 12) ¦ ¦ ¦ ¦ +------------- day of week (0 - 6) (Sunday to Saturday, 7 is also Sunday) ¦ ¦ ¦ ¦ ¦ +------------- some shell command ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ * * * * * reboot (In this UDF the 6th field has no meaning and no influence on the result). For more information see https://en.wikipedia.org/wiki/Cron Finds the next event of the specified Cron expression, starting from current UTC/GMT. _pce_findNextTimeUTC($sCronExp [, $bForwardSearch = True [, $minutesOffset = 0]]]) Finds the next event of the specified Cron expression. If $sDateTime is not set, local time will be used. _pce_findNextTime($sCronExp [, $bForwardSearch = True [, $sDateTime = "" [, $minutesOffset = 0]]]) Convert names in usable Cron expression values. e.g. "15-30 2,3,4,5 29 July-December Mo-Su" to "15-30 2,3,4,5 29 7-12 1-7" _pce_convertNames( $sCronExp ) See the include for details. New version on GitHub: https://github.com/seizu/CronToTime
  2. I have an exe with name "erwin Data Modeler r9.7 (32-bit)_2332.exe" THe lat 4 digits 2332 may vary and also the version number r9.7 also might vary. So, how to write a generic expression so that the exe can be picked from the current directory {with any version (9.7 or anything) and any build number (2332 or anything)} Thanks in Advance
  3. Hey everyone I'm stuck with this regular expression, for matching a iso standard version what I want to do is match the text in green: ISO 11784:1996/Amd.2:2010(E) there is also others that look like this: ISO 11789:1999(E), and without the (E) part, Só I did this one  (?i)ISO.+?[\d-]+:(?:\d+/Amd.+?:)?[\d-]+(?:\(\w\))* to match both cases but doesn't ignore the text in red Can somebody point out what I'm doing wrong here?
  4. Howdy! I am trying to do something a little whacky but here's the function that's kicking back an error. I am fairly sure I am overlooking a simple error but I am not seeing it. Func mouseSpot () Global $mouseSpot = MouseGetPos() ConsoleWrite ($mouseSpot[0] & ", " & $mouseSpot[1] & @CRLF) FileWriteLine ("mouseGrabs.txt" , "MouseClick ('"'primary'"' , $mouseSpot[0] , $mouseSpot[1], 1, 10)" ) EndFunc The error displays as this Any thoughts? Thanks! -Reiz
  5. I'm getting the syntax error: "Statement cannot be just an expression." Here's the piece of code where it occurs: $Check = WinExists("MySQL Installer") If $Check <> "" Then WinClose("MySQL Installer") Else $Check = ControlGetHandle("", "&No", '[CLASS:Button; INSTANCE:2]') If $Check <> "" Then ControlClick("", "&No", '[CLASS:Button; INSTANCE:2]') Sleep(10000) WinClose("MySQL Installer") EndIf EndIfAnyone know why this error is occurring?
  6. For some obvious reason, Sucessfully to translate an #computing padding algorithm, and outputting same value with example of an explanation Lets take a breath, wiki say: The following formulas provide the number of padding bytes required to align the start of a data structure (where mod is the modulo operator): # pseudo-code, see actual code below padding = (align - (offset mod align)) mod align new offset = offset + padding = offset + (align - (offset mod align)) mod align For example, the padding to add to offset 0x59d for a structure aligned to every 4 bytes is 3. The structure will then start at 0x5a0, which is a multiple of 4. Note that when offset already is a multiple of align, the second modulo in (align - (offset mod align)) mod align is required to get a padding of 0. Then I write AutoIt3 script. ConsoleWrite(@CR & '+ Computing padding' & @CR) Local $align, $offset, $padding, $new_offset $align = 4 $offset = 0x59d $padding = Mod($align - Mod($offset, $align), $align) $new_offset = $offset + $padding + Mod($offset + ($align - Mod($offset, $align)), $align) ConsoleWrite('padding: ' & $padding & ' new offset: 0x' & StringLower(Hex($new_offset, 4)) & @CR) And the output is match with example in explanation. + Computing padding padding: 3 new offset: 0x05a0 The question #01 are is that are correct translation? changing second line on second (=) (see below) with plus sign (+) in AutoIt3 (see above) ? new offset = offset + padding = offset + (align - (offset mod align)) mod align . Again lets take a breath, wiki say: If the alignment is a power of two, the modulo operation can be reduced to a bitwise boolean AND operation. The following formulas provide the new offset (where & is a bitwise AND and ~ a bitwise NOT): padding = align - (offset & (align - 1)) = (-offset) & (align - 1) new offset = (offset + align - 1) & ~(align - 1) Then I write AutoIt3 script. ConsoleWrite(@CR & '+ align 2 - Power of Two' & @CR) Local $align, $offset, $padding, $new_offset $align = 2 $offset = 0x59d $padding = $align - (BitAND($offset, ($align - 1))) + BitAND((-$offset), ($align - 1)) $new_offset = BitAND(($offset + $align - 1), BitNOT($align - 1)) ConsoleWrite('padding: ' & $padding & ' new offset: 0x' & StringLower(Hex($new_offset, 4)) & @CR) And the output is. + align 2 - Power of Two padding: 2 new offset: 0x059e The question #02. First line and second (=) I replace with plus (+) sign, again is that correct? The question #03. What is meaning from the word of 'The Power of Two'? Are 2 is The Power of Two? Are 4, 8, 16 is The Power of Two? Which are the number are is The Power of Two and which is not? Can someone give me an confirmation if translation that pseudo-code to AutoIt3 are correct.? Can someone give me an explanation what is so called 'The Power of Two'.? Please answer even if you think this are childish question, because I'm not from Brittain nor from American.
×
×
  • Create New...