This script used to work on an older version of AutoIT. Currently I am running AutoIT v220.127.116.11 and it's failing.
Func PublicIP() ;Post public facing IP address Local $url = 'https://www.google.com/search?client=opera&q=what+is+my+ip&sourceid=opera&ie=UTF-8&oe=UTF-8' Local $getIPaddress = BinaryToString(InetRead($url)) Local $sStart = 'clamp:2">' Local $sEnd = '</div>' Local $ipaddress = _StringBetween($getIPaddress, $sStart, $sEnd For $i In $ipaddress MsgBox(0, 'External IP', "Your public IP address is " & $i) Next EndFunc ;==>PublicIP The console output shows:
"C:\Users\user\Documents\AutoIT\Scripts\WSI Tools.au3" (197) : ==> Variable must be of type "Object".: For $i In $ipaddress For $i In $ipaddress^ ERROR ->14:12:16 AutoIt3.exe ended.rc:1 +>14:12:16 AutoIt3Wrapper Finished. >Exit code: 1 Time: 9.811
I'm listing the error message strings, and roughly matching the error code
Is this how to do error reporting? Is there a more simple way I don't know about?
I realise I might not need to trap @error inside $error. I like it this way b/c I have no fear of overwriting @error now; I don't even use it.
Func Send_Connect($address, $port) $socket = TCPConnect($address, $port) $error = @error If $error <> 0 Then Local $aError = ["-2 not connected.", _ "1 IPAddr is incorrect.", _ "2 port is incorrect."] $aError = "10060 Connection timed out." If $error < 0 Then $error = 0 If $error > 2 Then $error = 3 MsgBox(0, "TCP Connect Error", $aError[$error], 0) $socket = 0 EndIf Return $socket EndFunc
; NetFirewallPolicy2 COM UDF Library for AutoIt3
; AutoIt Version : 18.104.22.168
; Description ...: Windows Firewall Policy2 Interface, Provides access to the firewall policy for Windows Vista+
Including Test Script
_NetFw_Get_CurrentProfileTypes Retrieves the currently active firewall profile(s) _NetFw_Get_FirewallEnabled Indicates whether a firewall is enabled locally _NetFw_Put_FirewallEnabled Specifies whether a firewall is enabled locally _NetFw_Get_ExcludedInterfaces Indicates a list of interfaces on which firewall settings are excluded _NetFw_Put_ExcludedInterfaces Specifies a list of interfaces on which firewall settings are excluded _NetFw_Get_BlockAllInboundTraffic Indicates whether the firewall should not allow inbound traffic _NetFw_Put_BlockAllInboundTraffic Specifies whether the firewall should not allow inbound traffic _NetFw_Get_NotificationsDisabled Indicates whether interactive firewall notifications are disabled _NetFw_Put_NotificationsDisabled Specifies whether interactive firewall notifications are disabled _NetFw_Get_UnicastResponsesToMulticastBroadcastDisabled Indicates whether the firewall should not allow unicast responses to multicast and broadcast traffic _NetFw_Put_UnicastResponsesToMulticastBroadcastDisabled Specifies whether the firewall should not allow unicast responses to multicast and broadcast traffic _NetFw_Get_Rules Retrieves the interface to collection of firewall rules _NetFw_Get_ServiceRestriction Retrieves the interface used to access the Windows Service Hardening store _NetFw_EnableRuleGroup Enables or disables a specified group of firewall rules _NetFw_IsRuleGroupEnabled Determines whether a specified group of firewall rules are enabled or disabled for the current profile _NetFw_RestoreLocalFirewallDefaults Restores the local firewall configuration to its default state _NetFw_Get_DefaultInboundAction Indicates the default action for inbound traffic _NetFw_Put_DefaultInboundAction Specifies the default action for inbound traffic _NetFw_Get_DefaultOutboundAction Indicates the default action for outbound traffic _NetFw_Put_DefaultOutboundAction Specifies the default action for outbound traffic _NetFw_Get_IsRuleGroupCurrentlyEnabled Determines whether a specified group of firewall rules are enabled or disabled for the current profile _NetFw_Get_LocalPolicyModifyState Determines if adding or setting a rule or group of rules will take effect in the current firewall profile
7/8/2018: Uploaded a new SciTe4AutoIt3.exe v18.708.1148.0 installer.
It has been over a year since the last update of the full SciTE4AutoIt3 installer whch mainly had to do with the fact that Neil was moving toward v4 of SciTE and I wanted to wait for a stable version.
Any help with testing this version before general release is appreciated.
Also any feedback is welcome in caseI missed something or suggestions for improvement before releasing.
==> SciTE4AutoIt3 v18.708.1148.0
Addition/Changes/Fixes in the current installer:
-------------------------------------------------------------------------------------------------- 8-7-2018 *** Merged the SciTE v 4.1.0 by Neil Hodgson with our own version of SciTE. (Jos) This is a major change from the previous version so ensure you update all files including LUA or else you will get errors! - SciLexer au3: Fixed issues with nested CommentBlocks not always showing the correct color. - SciLexer au3: Change any line starting with # and no recognised keyword to be shown with the Pre-Processor in stead of default. - Changed Shortcut for AU3INFO to Ctrl+Shift+F6. - Moved the session restore logic for (save.session.advanced=1)into SciTE in stead of LoadSession.lua as that was clearing the recent files list of the last session when opening a file by double cliking it. This is fixed with this change. Default remains 0 so when a file is double clicked the last session isn't restored unless you add this to SciTEuser.properties: "save.session.advanced=1" - updated Tools.lua replacing [s%] with [ /t] to avoid empty lines being stripped by those functions. (Thanks Enyby) *** Updated AutoIt3Wrapper v18.708.1148.0 (Jos) - 17.224.935.1 Added /autoit3dir to au3stripper commandline, when provided to AutoIt3Wrapper., to ensure the included files are for the correct AutoIt3 directory - 17.224.935.2 Added directives: #AutoIt3Wrapper_Res_CompanyName= ;Company field #AutoIt3Wrapper_Res_LegalTrademarks= ;Trademark field - 17.224.935.5 Fixed Versioning when files contain backets -> () - 17.224.935.6 Added support for : #AutoIt3Wrapper_Au3stripper_Stop_OnError= ;(Y/N) Continue/Stop on Warnings.(Default=N) - 17.224.935.7 added INI support for: [Other] Au3Stripper_Stop_OnError=n - 17.224.935.10 Minor changes in console messages - 17.224.935.11 Modifications from JPM: - add #AutpIt3Wrapper_Res_Cursor_Add - "clean" a little bit AutoIt3Wrapper.au3 *** Updated Au3Stripper v18.708.1148.0 (Jos) - 17.224.935.1 Fixed crash when an include file contains longer record than 4096 characters. - 17.224.935.2 Changed /rsln to replace @ScriptLineNumber in the Master script with "XXX/YYY". XXX is the master script linenumber, YYY is the Merged script linenumber. - 17.224.935.3 Fixed issue detecting #cs #ce when a space was missing after the directive. - 17.224.935.4 Changed Close/Open logic for Tracelog to (hopefully) avoid the hardcrash. - 17.224.935.5 improved speed avoiding rereading include files to determine the max rec len. - 17.224.935.6 improved speed by re-coding the check for long records. - 17.224.935.7 Made sure the returncode is the highest from all iterations in stead of the last iteration. - 17.224.935.8 fix for reported bug: https://www.autoitscript.com/trac/autoit/ticket/3623#comment:4 - 17.224.935.9 added support for #autoit3wrapper_autoit3dir - 17.224.935.10 Fixed support for #autoit3wrapper_autoit3dir when followed by linecomment Stop processing when include file isn't found. - 18.624.1847.1 strip the leading and trailing double quotes from the autoit3dir directive to avoid an error when they are specified. - 18.624.1847.2 Fixed Hardcrash in the Include logic - 18.624.1847.3 Fixed Hardcrash in Func stripping logic by enlarging the base table size - 18.702.1556.1 Fixed regression bug with the Translate option. - 18.703.1808.2 Fixed regression bug with the Stripping FUNC logic for the first found FUNC. *** Updated SciTEConfig v18.708.1148.0 (Jos) - 17.224.935.1 No updates *** Updated Tidy v18.708.1148.0 (Jos) - 17.224.935.1 Added option to copy comments from #CS to #CE. Default is to copy the comments. Added Tidy Parameters: /Skip_CE_Comment or /scec will skip this copy action Added INI option: * * * Add comment to #CE/#CommentEnd and make it the same as the #CS/CommentStart Comments. ce_comment=1 - 17.224.935.2 Fix issue with Copy comments on comment start - end - 17.224.935.4 Fix another issue with Copy comments on comment start - end -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates.
==> Visit the SciTE4AutoIt3 Download page for the latest versions
==> Check the online documentation for an overview of all extra's you get with this installer.
Here i am wrote a simple lines to install basic applications but when i clicked on one application/program to install it was working fine but when i cancel the program in the middle to install another program it was not working. I am not an expert in this but i want a solution for this ... Can any one help me on this....