Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 09/24/2021 in all areas

  1. Chimp

    Aquarium

    This script is an alternative (improvement) to the script published at this link (www.autoitscript.com/forum/topic/186225-interesting-effect-with-transparency). In that post a flash animation was used and therefore you need the flash player to work, while here only javascript is used. Here, too, the aim is to show an interesting effect that can be obtained by exploiting transparency, but can also be used as it is just for fun. The animation consists of some fish wandering around the screen. You can continue working on the computer by letting them swim. The javascript source was not writt
    5 points
  2. Hello. Here is the Implementation of ISearchCompletedCallback If You understand how it works you will be able to implement BeginDownload required Interface callbacks. #include <WinAPICom.au3> Global Const $S_OK = 0x00000000 Global Const $E_NOINTERFACE = 0x80004002 Global Const $sIID_IUnknown = "{00000000-0000-0000-C000-000000000046}" Global Const $sIID_SearchCompletedCallback = "{88AEE058-D4B0-4725-A2F1-814A67AE964C}" Global Const $tagIUnknown = "QueryInterface hresult(ptr;ptr*);" & _ "AddRef dword();" & _ "Release dw
    5 points
  3. I voted other, because i wanted to. 😬
    4 points
  4. Hi, A word to the wise - enough talk of decompilers. M23
    4 points
  5. Looking back at the initial problem posted by the OP, I don’t think it takes much more than: Func main() Local $var1, $var2 web_extraction($var1, $var2) StringStripWS($var1, 3) EndFunc Func web_extraction(ByRef $var1, ByRef $var2) $var1 = "extracted info 1" $var2 = "extracted info 2" EndFunc
    4 points
  6. Subz

    Windows 11 and the IE udf

    Microsoft intends to support IE mode until 2029 (we use IE mode within Edge Chromium for some legacy software), have AutoIt code that uses a number of IE functions, including IE embedded and everything appears to be working correctly still.
    3 points
  7. jchd

    My own Binary() Function

    Make your life simple! Local $n = 53 Local $sBin = _UintToString($n, 2) ConsoleWrite($n & " evaluates as binary " & $sBin & @LF) Func _UintToString($i, $base) Return DllCall("msvcrt.dll", "wstr:cdecl", "_ui64tow", "uint64", $i, "wstr", "", "int", $base)[0] EndFunc ;==>_UintToString You can plug any value to $n and see what it yields.
    3 points
  8. Use RegEx and forget it, or spend an hour learning Jason JSON parsing? RegEx wins everytime!
    3 points
  9. Do you want my head to explode?
    3 points
  10. You're right. I worded that badly, good catch. Something more like "AutoIt was intended for automating things" would be more accurate. Trying to say, use the right tool and all well, read TheSaint's post above, lol
    3 points
  11. Hello, this could help you. #include <GuiConstants.au3> #include <WinAPISysWin.au3> #include <GuiMenu.au3> Main() Func Main() Local $hWnd, $iStyle, $hMenu, $aWinPos Run("notepad") $hWnd = WinWait("[Class:Notepad]", "") Sleep(50) ;~ Retrieves the handle of the menu assigned to the given window $hMenu = _GUICtrlMenu_GetMenu($hWnd) ;~ Deletes menu items from the specified menu For $i = _GUICtrlMenu_GetItemCount ($hMenu) - 1 To 0 Step -1 _GUICtrlMenu_RemoveMenu($hMenu, $i) Next ;~ Retrieves style about th
    3 points
  12. Jos

    AutoIt v3.3.15.4 Beta

    Scratch doubt and replace that with a definite NO WAY!
    3 points
  13. Jos

    au3 in another au3?

    There isn't much I can do about that as this is supposed to be an English forum. I am not warning you... merely explaining why you are getting these "smart remarks. mmm wasting your time? You decided to post here, not me, so please stop the whining and have a little bit more positive approach around here or else you likely won't be getting much support from people. So take a chill pill and try to be more positive and clear on what it is you are asking from us... that is all I ask!
    2 points
  14. Subz

    Windows 11 and the IE udf

    @Chimp Just confirming that both of the scripts you posted worked for me. Windows 11 Enterprise 21H2 (OS Build 22000.176)
    2 points
  15. mikell

    StringRegExpReplace help

    Assuming that the "mydomain" part may vary : Test1() Test2() ; get what you want Func Test1() Local $sInput = "mydomain\firstname.lastname" Local $sOutput = StringRegExpReplace($sInput, '.*?\\(.*)', "$1") Msgbox(0,"1", $sOutput) EndFunc ; or fire what you don't want Func Test2() Local $sInput = "mydomain\firstname.lastname" Local $sOutput = StringRegExpReplace($sInput, '[^\\]+\\', "") Msgbox(0,"2", $sOutput) EndFunc
    2 points
  16. Oops, have you forgotten about TheDcoder and co? Or were you heading in a nosy direction instead ... tissue everyone? And you can't have a proper BBQ without paper towels.
    2 points
  17. There is one particular place where every human being would hate to live in a paperless society .
    2 points
  18. please try current Beta version of Autoit3Wrapper.au3 to see if that fixes it for you
    2 points
  19. It's not meant to be understood, just appreciated. But in case you were wondering .... yes I would find more use for a stapler, than a comb ... even in this so-called paperless society ... my ass. P.S. I also need some bloody way to attach the paper pirate hat to my head.
    2 points
  20. What and give up the chance for some tasty RegEx?
    2 points
  21. One AutoIt “feature” that won’t be transferred to EasyCodeIt is a predisposition to anti-viral false positives. Although, that’s actually not my call
    2 points
  22. Well, that's good to know. Only if AutoIt executables weren't detected as viruses all the time. I updated one of my programs 2 weeks ago but due to all the false positives, the update process at chocolatey (it's a software repository) is still not complete. Yeah, in my opinion AutoIt isn't the best tool for product testing, instead one should rely on more integrated methods to test, and nothing tops a manual test by a human before a major release AutoIt is good for quick and easy automation, which is exactly what it's made for.
    2 points
  23. Maps are simpler and faster: Global $mCodes[] $mCodes["Alabama"] = "AL" $mCodes["Alaska"] = "AK" $mCodes["Arizona"] = "AZ" $mCodes["Arkansas"] = "AR" $mCodes["California"] = "CA" $mCodes["Colorado"] = "CO" $mCodes["Connecticut"] = "CT" $mCodes["Delaware"] = "DE" $mCodes["District of Columbia"] = "DC" $mCodes["Florida"] = "FL" $mCodes["Georgia"] = "GA" $mCodes[&
    2 points
  24. jchd

    Too many IF Statements

    Like @Melba23said in 2) From https://en.wikipedia.org/wiki/List_of_U.S._state_and_territory_abbreviations copy thee content of the states' table, remove the unwanted columns and make the data a global array (or better: a Map) in your code.
    2 points
  25. SkysLastChance, Two suggestions: 1. Use a Switch block. 2. Put the names and abbreviations into an array and search through it to find a match. M23
    2 points
  26. I am NOT a number! I am a FREE MAN!
    2 points
  27. Sorry, gotta disagree with you there, as I have built plenty of applications. So it does both. Sure, it doesn't have multi-threading and is not as fast as some other languages, but it can create great applications, and very quickly compared to most other languages. But as they say, use the right tool for the job, and there is certainly some jobs or applications that AutoIt is ill-suited for ... or another language does it better in some significant way. When AutoIt was introduced to the world, it was just a great scripting language, since then it has become a great GUI language
    2 points
  28. Right #include <AutoItConstants.au3> $cmd = "curl -sk " & "https://www.internetdownloadmanager.com/getlatestversion.html" Local $iPID = Run($cmd, "", @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($iPID) $file = StringRegExpReplace(StdoutRead($iPID), '(?s).*?filename=([^"]+).*', "$1") Msgbox(0,"", $file) Note that curl could be used to eventually dowload the file too
    2 points
  29. I feel like this conversation has been going since I joined this board. I'm starting to wonder if that conversation is as old as Autoit 2.
    2 points
  30. I feel like this is a super important point. Whenever my application gets complicated enough that multithreading would be helpful, I realize that it's time to rewrite (at least) that portion in another language. AutoIt is for automating things, not building applications. That's not to say I haven't tried though
    2 points
  31. It is quite funny how often this multithreading stuff comes up which probably means one has really no clue what it entails to create a script that will automate something with multithreading. AutoIt3Wrapper is a multi process script and works fine that way. Just shell another process and don't hold your breath for it to be part of the standard AutoIT3 functionality.
    2 points
  32. Take a look also for _wd_sleep()
    2 points
  33. Hello, AutoIT is my first programming language. However, It's been a long long time from the last minute I used AutoIT. Today, I'm very happy to see that this language is still used by many developers. I want to introduce 3 games I developed in AutoIT more than 5 years ago. - Minichess game: https://github.com/vietanhdev/minichess - Line98: https://github.com/vietanhdev/line98 - TicTacToe: https://github.com/vietanhdev/tic-tac-toe Thank you for creating such a friendly language! And also hope that it can thrive in the future!
    2 points
  34. You might also use a regular expression to do the job in one shot $txt = " MoveJ [[-320.62,-132.78,227.68],[0.998219,0.0444207,-0.0168298,0.0360765],[-1,-1,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v300,fine,Out_Ciseau\WObj:=rep_refil;" & @crlf & _ " Set S_lames;" & @crlf & _ " MoveL [[-257.19,-178.26,187.01],[0.952349,-0.0379082,-0.0440127,0.299429],[0,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v300,fine,Out_Ciseau\WObj:=rep_refil;" & @crlf & _ " coupe_G;" & @crlf & _ " SetAO E
    2 points
  35. Ha! Got you fooled. 😃
    2 points
  36. Melba23

    Short My Code ?

    jmp, No, you try and code something yourself based on what I have already given you. If it does not work we can discuss why. M23
    2 points
  37. BigDaddyO

    Short My Code ?

    This is as short as I can make it #include <GUIConstantsEx.au3> #include <IE.au3> #include <MsgBoxConstants.au3> Global $oIE = _IEAttach ("webpage") Global $aMonth[12][2] = [[0, "January"], [0, "February"], [0, "March"], [0, "April"], [0, "May"], [0, "June"], [0, "July"], [0, "August"], [0, "September"], [0, "October"], [0, "November"], [0, "December"]] Local $hGUI = GUICreate("Select Month", 200, 365) For $b = 0 to UBound(
    2 points
  38. amro, That is the same script that you just told us was for a game - we are not stupid. Please do not post again on this subject - our patience has limits. M23
    2 points
  39. mLipok

    quick question

    quick answer YES
    2 points
  40. Finally I get it works: ;~ https://www.autoitscript.com/forum/topic/178561-simple-web-downloader-with-progress-bar/?do=findComment&comment=1301321 #include <FileConstants.au3> #include <StringConstants.au3> #include "WinHttp.au3" Global $EXAMPLE_URL = "" Global $EXAMPLE_FILE = "" ;~ _Example(0) _Example(1) ;~ _Example(2) Func _Example($iMode) Local $hOpen = _WinHttpOpen() ; Initialize and get session handle Local $hConnect = _WinHttpConnect($hOpen, $EXAMPLE_URL, $INTERNET_DEFAULT_HTTPS_PORT) ; Get connection handle ;~
    2 points
  41. @Chimp You're code does not work for me. So I did a mod. _Example() Func _Example() _SetBroswerEmulation() Local $o_Obj = __HTMLFILEObjCreate() $o_Obj.write('<script src="https://momentjs.com/downloads/moment.min.js"></script>') $o_Obj.write('<script>var JSglobal = (1,eval)("this");</script>') $o_Obj.write('<script>function Hello(arg){return "Hello " + arg;}</script>') Local $oJs=$o_Obj.parentwindow.JSglobal MsgBox(0, "",$oJs.eval("moment().format(&
    2 points
  42. 2️⃣4️⃣um. Check this:
    2 points
  43. I made a TCP networking UDF https://github.com/OfficialLambdax/_netcode_Core-UDF I launched this Thread to go into details of certain features and how i plan to implement them, mostly TLS, the Optional User Database and 2FA. Im going to create seperate posts in this Thread whenever i have something to show off. Just to be clear, it is best to not use the UDF in your projects yet. Everything is subject to change and big potions of it need entire rewrites. So documentation and examples are ment to be created right before the UDF hits Alpha, thats not going to happen so fast. The
    2 points
  44. Hi, The Devs were discussing this a while ago and came up with two possible workarounds for the standard AutoIt include functions to prevent this scenario. Here are the options for _NowCalc: Func _NowCalc_Atomic() Local $tStamp = _Date_Time_GetLocalTime() Return DllStructGetData($tStamp, "Year") & "/" & _ StringFormat("%02s", DllStructGetData($tStamp, "Month")) & "/" & _ StringFormat("%02s", DllStructGetData($tStamp, "Day")) & " " & _
    2 points
  45. Hello. It needs a string as option parameter. Opt('SendKeyDelay',80) Opt('SendKeyDownDelay',20) Saludos
    2 points
  46. Hello. It's me again. Just to leave a whole example. #RequireAdmin #include <WinAPICom.au3> #include <Debug.au3> #include <Array.au3> Global Const $S_OK = 0x00000000 Global Const $E_NOINTERFACE = 0x80004002 Global Const $sIID_IUnknown = "{00000000-0000-0000-C000-000000000046}" Global Const $sIID_ISearchCompletedCallback = "{88AEE058-D4B0-4725-A2F1-814A67AE964C}" Global Const $sIID_IDownloadCompletedCallback = "{77254866-9F5B-4C8E-B9E2-C77A8530D64B}" Global Const $sIID_IDownloadProgressChangedCallback = "{8C3F1CDD-6173-4591-A
    2 points
  47. I have no clue what you want to achieve with this "script". A detailed description would be helpful. As you can notice yourself from the compiler messages, there are various syntax errors. For example, MouseGetPos is a function, so you have to set parentheses () even if you don't pass any values. Otherwise, it is treated as a variable that is currently neither declared nor has a value assignment. Here is a (quick & dirty) example, but it likely won't do what you want. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_OutFile_Type=a3x #EndRegion
    2 points
  48. I suppose you meant this Func ToggleST() $TooltipToggle = Not $TooltipToggle
    2 points
  49. Is there a problem with that notation when using a standalone variable for the index, yes -- which neither of us did. Is there a problem with that notation when using a literal as an index, no. The reported issue seems to be related to using a standalone variable as in index. When using that notation, I have had success with using a literal, an expression, or an enum as an index without any issues. Hopefully the fix allows standalone variables to be used also. If you have more questions, comments, or concerns related to the reported issue, it would probably be best to start a new
    2 points
×
×
  • Create New...