Jump to content

Bowmore

Active Members
  • Posts

    1,007
  • Joined

  • Last visited

  • Days Won

    4

Bowmore last won the day on March 25 2018

Bowmore had the most liked content!

About Bowmore

  • Birthday 01/05/1955

Profile Information

  • Member Title
    Coire Dearg
  • Location
    Southampton UK
  • Interests
    GIS Programming, Africa, Exploring the far north west of Scotland in search of beatiful wild Brown Trout. Islay whisky.

Recent Profile Visitors

858 profile views

Bowmore's Achievements

  1. Zedna Thanks for that suggestion I had not thought of doing that. It's probably a simpler for me to include a zip of the installer with my code archive. Thanks
  2. Thanks RTFC CodeScanner is perfect for my needs, better than I was hoping for.
  3. I've got a lot of AutoIt applications that I've written for work and I'm wanting to package the source for each of them in a zip file including all the includes and any dlls etc. The reason I want to do this is to enable minor tweaks to be quickly made to the applications in the future without having to worry about it not building due to some significant upgrade to one or more of the includes. Before I start writing myself a script to do this I would just like to check if anyone knows of script that will recursively parse all the included in the main au3 file and produce a list of all include files the application is dependent on.
  4. ;~.......... <File2.au3> .......... Local $cell = 1 Local $Description ="TTT3" Local $var = "C:\AutoIT_Excel_Report\Book3.xlsx" Local $oExcel = _Excel_Open (True) Local $oWorkbook = _Excel_BookOpen ($oExcel, $var) These variables you have declared in File2.au3 as Local are in fact Global. AutoIt treats all variable declared outside a function as Global. There is no file scoping in AutoIt like some other languages.
  5. This is not a bug in au3check. The variable $rc in you function is initialised but never read/used, hence the warning. In your test function $rc is completely redundant. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Func _test() Local $rc = 1 ? Beep() : "" EndFunc   ;==>_test _test()
  6. This pattern will give you the correct result if I have understood your requirement correctly $pattern = '(ZA|WA|VA|Z|W|V)([0-9]{1,3})(?:[-])([0-9]{1,3})([y,Y]{0,1})'
  7. I downloaded your script in your first post and compiled it unaltered then executed it from a command prompt as Monitors>P:\Downloads\EPP_NF_Replacer_UBI.exe /ExtractSourceCode This created a file P:\Downloads\EPP_NF_Replacer_UBI.exe.txt Which contains the the original source code from P:\Downloads\EPP_NF_Replacer_UBI.au3 From this I can see only 2 possibilities why this is not working for you You are mistyping the command-line parameter "/ExtractSourceCode" Your anti-virus is seeing this as suspicious behaviour and deleting the extracted file.
  8. This line is invalid. You can't use macros or variables as the source value in FileInstall. You must use literal paths and file names. FileInstall(@ScriptFullPath, @ScriptDir & "\" & @ScriptName & ".txt", 1) It needs to be something like this FileInstall("C:\dir1\dir2\myscript.au3", @ScriptDir & "\" & @ScriptName & ".txt", 1) Or FileInstall(".\myscript.au3", @ScriptDir & "\" & @ScriptName & ".txt", 1)
  9. This value "WindowsForms10.BUTTON.app.0.2bf8098_r13_ad11" will probably change every time the application is run. Determine which part changes and then use REGEXPCLASS to work with the part that does not change.
  10. Hi tecc My mistake, I was not looking at the output closely enough. Are you sure the last number +49 2345 55555 is correct the last group only has 5 numbers. No matter I have amended my regular expression to allow 5 or 6 numbers in the last group. Local $sFormatted = '' Local $aPhoneNumbers[11] $aPhoneNumbers[0] = "+49 (0) 1234 567890" $aPhoneNumbers[1] = "+49 1234 567890" $aPhoneNumbers[2] = "01234 567890" $aPhoneNumbers[3] = "01234567890" $aPhoneNumbers[4] = "+34 (0) 1234 567890" $aPhoneNumbers[5] = "+34 1234 567890" $aPhoneNumbers[6] = "+41 1234 567890" $aPhoneNumbers[7] = "+411234567890" $aPhoneNumbers[8] = "+41 1234567890" $aPhoneNumbers[9] = "+49 1234 567890" $aPhoneNumbers[10] = "+49 2345 55555" For $i = 0 To 10 $sFormatted = StringRegExpReplace(StringRegExpReplace($aPhoneNumbers[$i],'^(?:\+(\d{2}) ?(?:\(0\))? ?|(0))(\d{4}) ?(\d{5,6})$','00\1\2\3\4'),'^(?:0049|000)(\d+)$','0\1') ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sFormatted = ' & $sFormatted & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console next
  11. Slightly modified version to output without spaces Local $sFormatted = '' Local $aPhoneNumbers[6] $aPhoneNumbers[0] = "+49 (0) 1234 567890" $aPhoneNumbers[1] = "+49 1234 567890" $aPhoneNumbers[2] = "01234 567890" $aPhoneNumbers[3] = "+34 (0) 1234 567890" $aPhoneNumbers[4] = "+41 1234 567890" $aPhoneNumbers[5] = "+34 1234 567890" For $i = 0 To 5 $sFormatted = StringRegExpReplace(StringRegExpReplace($aPhoneNumbers[$i],'^\+([^4][^9]|[0-9]{2})[ 0)(]*([0-9]{4}) ?([0-9]{6})$','00\1\2\3'),'^(?:0049[0-9]|(0[^0])) ?([0-9]{3}) ?([0-9]{6})$','0\1\2\3') ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sFormatted = ' & $sFormatted & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console next
  12. This works for all your examples. It's probably possible to come up with something more elegant, but it does the job Local $sFormatted = '' Local $aPhoneNumbers[5] $aPhoneNumbers[0] = "+49 (0) 1234 567890" $aPhoneNumbers[1] = "+49 1234 567890" $aPhoneNumbers[2] = "01234 567890" $aPhoneNumbers[3] = "+34 (0) 1234 567890" $aPhoneNumbers[4] = "+41 1234 567890" For $i = 0 To 4 $sFormatted = StringRegExpReplace(StringRegExpReplace($aPhoneNumbers[$i],'^\+([^4][^9]|[0-9]{2})[ 0)(]*([0-9]{4}) ?([0-9]{6})$','00\1 \2 \3'),'^0049 (.*)$','0\1') ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sFormatted = ' & $sFormatted & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console next
  13. ContolSetText is another quick option Func _OutFile() $TempEdit = GUICtrlRead($Edit1) $OutEdit = StringReplace($TempEdit, @LF, "") Run("notepad.exe") WinWaitActive("Untitled - Notepad") Sleep(1000) ControlSetText("Untitled - Notepad", "", "Edit1", $OutEdit) EndFunc
  14. With ControlClick() the coords specify the position to click relative to the top left of the control,
  15. As with all these types of questions the answer is to try it and see where the text is placed. From MSDN PHYSICALOFFSETY For printing devices: the distance from the top edge of the physical page to the top edge of the printable area, in device units. For example, a printer set to print at 600 dpi on 8.5-by-11-inch paper, that cannot print on the topmost 0.5-inch of paper, has a vertical physical offset of 300 device units.
×
×
  • Create New...