Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/2018 in all areas

  1. ... and regex version of Malkey's code Local $num = "64704", $new = $num, $sRet = $num & @CRLF For $i = 1 To 10 $new = Execute(StringRegExpReplace($new, '(\d)', " Mod('$1'+1, 10) & ") & "''") $sRet &= $new & @CRLF Next MsgBox(0, "Result", "Starting number: " & $num & @CRLF & @CRLF & $sRet)
    2 points
  2. Funny challenge #Include <Array.au3> $str = "+AA1/AA2/AA3+BB1/BB2+CC1/CC2/CC3/CC4+DD4" $a = StringRegExp($str, '[^+]+', 3) Local $aRes[0][UBound($a)], $string, $sRes _LetsGo(0, "") _ArrayAdd($aRes, StringTrimRight($sRes, 2)) _ArrayDisplay($aRes) Func _LetsGo($k, $string) Local $tmp = StringSplit($a[$k], "/", 2) For $i = 0 to UBound($tmp) -1 If $k = UBound($a) -1 Then $sRes &= $string & $tmp[$i] & @crlf Else _LetsGo($k + 1, $string & $tmp[$i] & "|") EndIf Next EndFunc
    2 points
  3. j0kky

    Currently used DNS

    Hi folks, Last morning I needed to know programmatically which were my DNS(s) for the current connection, and I searched for an API which fitted my needs... I just tried dnsqueryconfig, which shows the DNS(s) used, if you have manually selected them in the past. The API is little tricky (or maybe I'm little rusty), so I decided to write a small UDF function to avoid a waste of time in the future... here you are. ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_DnsQueryConfig ; Description ...: Retrieves the currently used DNS servers, if they were selected by user ; Syntax.........: _WinAPI_DnsQueryConfig() ; Return values .: On success it returns an array with the list of currently used DNS servers ; ; On failure it returns 0 and sets @error to non zero (these values are useful only for debugging reasons): ; |1 - DllCall error ; |2 - Generic error, DNS could be generated automatically ; Author ........: j0kky ; Modified ......: 1.0.0 14/11/2018 ; Link ..........: https://docs.microsoft.com/en-us/windows/desktop/api/windns/nf-windns-dnsqueryconfig ; =============================================================================================================================== Func _WinAPI_DnsQueryConfig() Local Const $DnsConfigDnsServerList = 6 Local $aRet = DllCall("Dnsapi.dll", "LONG", "DnsQueryConfig", "int", $DnsConfigDnsServerList, "dword", 0, "ptr", Null, "ptr", 0, "ptr", Null, "dword*", 0) If @error Then Return SetError(1, 0, 0) if $aRet[6] <= 4 Then Return SetError(2, 0, 0) Local $tagBuffer = "" For $i = 1 To ($aRet[6] / 4) $tagBuffer &= "dword;" Next Local $tBuffer = DllStructCreate($tagBuffer) $aRet = DllCall("Dnsapi.dll", "LONG", "DnsQueryConfig", "int", $DnsConfigDnsServerList, "dword", 0, "ptr", Null, "ptr", 0, "ptr", DllStructGetPtr($tBuffer), "dword*", $aRet[6]) Local $aDNS[($aRet[6] / 4) - 1] For $i = 2 to (UBound($aDNS) + 1) $aRet = DllCall("Ws2_32.dll", "str", "inet_ntoa", "dword", DllStructGetData($tBuffer, $i)) if @error Then Return SetError(1, 0, 0) $aDNS[$i - 2] = $aRet[0] Next Return SetError(0, 0, $aDNS) EndFunc
    2 points
  4. It works sort-of as it returns all changes to the GUI but the GUI is unresponsive. I actually have the proper working code prepared but simply refuse to provide code to people unwilling to make any progress themselves first and make this a learning experience. Jos
    2 points
  5. R0G

    Digital Sign Tool

    Digital Sign Tool V1.6 Features: Digitally sign: (.exe) (.cab) (.cat) (.ocx) (.dll) (.stl) Metro style GUI thanks @BBs19 Error logging Multi file support Instructions: You must have your (.pfx) certificate imported to the "Current User\Personal\Certificates" store Your certificate must be exportable Select your digital certificate from the drop down menu Click browse to add your files to sign Click sign For more information please visit: https://www.autoitscript.com/forum/topic/149137-sign-your-exe-with-a-digital-signature-signtoolexe/#comment-1061738 https://msdn.microsoft.com/en-us/library/bfsktky3(vs.100).aspx?f=255&MSPPError=-2147217396 Changelog: V1.6 1/8/2021 - Updated broken Signing URL - Added option to change signing URL in settings - Other Bug Fixes Download: Digital Sign Tool V1.6.zip Digital Sign Tool V0.5.zip
    1 point
  6. ClaudiuZ, In that case we are not prepared to help you as the possibility of such code being used for nefarious purposes is far too high - thread locked. M23
    1 point
  7. xtcislove, Sorry it has taken so long, but I managed to reproduce the effect you were seeing above on another x64 machine and pinpoint the problem - which I believe I have now solved. Here is an amended version of the UDF - can you please test it and see if it solves the problem for you too: ChooseFileFolder_Mod.au3 By the way, this Beta code also contains a whole slew of other amendments which I have been waiting to release - I put them all together to se if they would play nicely once all inserted and so far they do. So do not be alarmed if some things appear a little different - all I am interested in at the moment is getting the UDF to work correctly under x64. M23
    1 point
  8. The Send command interprets "+" as the Shift key (according to the help file ). Please use something like this: #include <AutoItConstants.au3> WinWaitActive("Open") Send($CmdLine[1], $SEND_RAW) Send("{ENTER}")
    1 point
  9. Thanks @Malkey. This is the one thing that I want to happen. Thank you so much. @Deye, Here's the format of my post. When it reaches back to 123, the program stop. means the program reaches 0-9 in each number. Anyways, thank you for responding
    1 point
  10. Helmeh220, The previous posters are quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again. Thread locked. M23
    1 point
  11. This appears to work. Local $num = "64704", $NewNum = $num, $NewNum1, $sRet = $num & @CRLF For $i = 1 To 10 For $j = 1 To StringLen($num) $NewNum1 &= StringRight(StringMid($NewNum, $j, 1) + 1, 1) Next $sRet &= $NewNum1 & @CRLF $NewNum = $NewNum1 $NewNum1 = "" Next MsgBox(0, "Result", "Starting number: " & $num & @CRLF & @CRLF & $sRet)
    1 point
  12. @careca please remove all your pointers. Thx. Protect AutoIT with us Thanks.
    1 point
  13. Oh, you meant the code. I was thinking about the GUI itself for the msgbox.
    1 point
  14. TheXman

    how to make it look good

    If you are referring to the statement itself and not the content of the MsgBox, then you could use line continuation to break it up into logical chunks like this: MsgBox(1, "Instructions", _ "1) Enter the report number in the box with a space in between" & @LF & _ "2) Reports 1 to 20 are reports with All project range" & @LF & _ "3) If you key in 21 it will run all reports from 1 to 20" & @LF & _ "4) Reports 22 and 23 are reports where you select the project range to run" & @LF & _ "5) Number 24 runs a macro to compile reports 22 and 23 and saves it " & @LF & _ "6) Before running 24 on its own please ensure that the files to be compiled arethere in the folder" & @LF & _ "8) Report 25 runs everything from 22 to 24 together hence it is adviced that the planner run 25 for the compiled file" & @LF & _ "9) Each report is saved in a default folder and the setting can be changed easily" _ )
    1 point
  15. What does line number 7 represent?
    1 point
  16. IonGoG Wishlist has been updated to v0.0_b20, see first post. Bugfixes and improvements, plus I discovered I wanted to be able to add GOG movies to the 'bought' list at least ... which I did with the recent The Witcher 3 Live Concert freebie. (v0.0_b20) A GOG movie can now be added to the list. (NOTE - This is pretty basic, so I may do some further tweaking to this, but have nothing planned right now.) (v0.0_b19) Bugfix for 'Release Date' and extra data in 'Genre' relocated to end of 'Requirements'. A prompt to Update downloaded image is no longer the default on SAVE, but can be selected. Combo field for Player Type now loses focus on selection, to avoid mouse wheel issues. Other minor improvements. (v0.0_b18) QUERY price now briefly provides a prompt when checking in Automatic mode, giving the possibility of a simple update manually (20 second delay on initial program usage, but 5 seconds thereafter for each entry check).
    1 point
  17. I also use the RunOnce key plus a self created "flag" key in HKLM\Software to tell me what state of my run I'm in, and I automate (or remove) automatic logon using Autologon.exe from SysInternals (some things might require a user-profile to be existing, if you create a user some items are not populated in registry for that user until profile is created during login). The flag key helps when you have to add software or use DISM to add a feature to Windows and a reboot is required so that another tool that requires the software or feature can run. It's an alternative to the command-line method JLogan3o13 posted.
    1 point
  18. water

    sizebox

    Please have a look at GUICtrlSetResizing.
    1 point
  19. JLogan3o13

    complex issue in dos

    @boy15 you should realize by now from all of the responses you have received that this forum operates under the "Teach a Man to Fish" motto. We do not spoon-feed you code; you actually have to put some effort in. The whole "it's difficult just do it for me" doesn't work caramen and modemjunki have both given you solid suggestions to go on - try them for yourself, and then if you run into issues post your code and we will do our best to assist.
    1 point
  20. ClaudiuZ, Nine makes a very valid point - and until I have a satisfactory answer this thread goes nowhere. M23 P.S. And just to be absolutely clear - this is the Mod team determining the legality of the thread, so everyone else please keep out.
    1 point
  21. Ah.. that's a good approach to life... when confused simply ignore it and it for sure will go away.
    1 point
  22. love to be ignored while I think the answer is in my previous post ... whatever
    1 point
  23. sigh. you have already been given the correct answers, use the api and another script to do it the professional way. time stamping can be disabled on any given os
    1 point
  24. Jos

    Get data from json

    This should be close: #include <Inet.au3> #include <json.au3> $URL = "https://api.abucoins.com/products/stats" $data = _INetGetSource($URL) $object = json_decode($data) Local $i = 0 While 1 $product_id = json_get($object, '[' & $i & '].product_id') If @error Then ExitLoop If $product_id = "ETH-BTC" Then $volume_USD = json_get($object, '[' & $i & '].volume_USD') ConsoleWrite('$volume_USD = ' & $volume_USD & @CRLF ) ;### Debug Console EndIf $i += 1 WEnd Jos
    1 point
  25. Found the solution, while looking in the source of _GuiCtrlTreeView_ExpandItem: ; $hTreeView = Handle to your TreeView Control ; $hItem = Handle to your TreeView Item _SendMessage($hTreeView, $TVM_EXPAND, $TVE_EXPAND, $hItem, 0, "wparam", "handle") _SendMessage($hTreeView, $TVM_ENSUREVISIBLE, 0, $hItem, 0, "wparam", "handle")
    1 point
  26. JSThePatriot

    Drive Info UDFs

    NerdFencer, Your code looks great! You've even put in place all the error codes!! Excellent! I haven't ever spent the time to go back through and do that with my code... hehe I'm going to link this post right on the first post of my CompInfo thread. @footswitch Thanks for posting this on the CompInfo thread...this is a great UDF!! NerdFencer if you want we can combine the UDF's, but it may not be a bad idea to have them seperate as you can see I haven't added to mine or upgraded in a while. I was wanting to add drive support more in mine, but never have. So either way. Great job, love the code, and I'm glad you were inspired by my script. Thanks, Jarvis
    1 point
×
×
  • Create New...