Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hey im looking for a way to read the COM Port from 2 special devices in the device manager, they got a fix name, someone knows how to do it?
  3. Hi, In my script I'm using the following code : Global $Arr[1][2] = [["{ENTER}", $Enter_KEY]] GUISetAccelerators($Arr) So when the "Enter" key is used, some fuction are executed based on the Control currently focused. It works vers well for my 2 input boxes, but it breaks" the "$ES_WANTRETURN" flag I'm using for my Edit control. I've written a custom Func which reproduce the line feed/carriage return in the edit box, and i'm using this func to replace the carret on the correct line : https://www.autoitscript.com/forum/topic/118476-how-to-position-the-cursor-in-a-multi-line-edit/?tab=comments#comment-824334 But is there a way to skip this control so it receive the normal message and performs a carriage return like it would without an accelerator ?
  4. Today
  5. @Nine I believe the issue is related to browser restrictions limiting access to cross-domain elements. I was actually able to make it work by navigating to the domain that contains the desired data -- #include <IE.au3> #include <array.au3> $oIE = _IECreate("https://www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html") _IENavigate($oIE, "https://cmegroup-tools.quikstrike.net/User/QuikStrikeView.aspx?viewitemid=IntegratedFedWatchTool") $oTable = _IETableGetCollection($oIE, 4) $aData = _IETableWriteToArray($oTable) _ArrayDisplay($aData)
  6. excuseme, this script writes even old datas that already written by different program can you guide me to only get new data?
  7. @Danp2 Id is always changing. And for some reason _IEFrameGetCollection doesn't work for that site. Only way I was able to access it is by using this code : #include <IE.au3> Opt ("MustDeclareVars", 1) Local $oIE = _IECreate("https://www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html") If Not IsObj ($oIE) Then Exit MsgBox ($MB_SYSTEMMODAL,"","Error creating IE object") Local $oFrames = _IEFrameGetCollection ($oIE) ConsoleWrite ("Number of frames : " & $oFrames.length & @CRLF) For $oFrame in $oFrames ConsoleWrite (ObjName ($oFrame) & @CRLF) ; it doesn't write anything Next Local $oDivs = _IETagNameGetCollection ($oIE, "div") Local $oObject For $oDiv in $oDivs if $oDiv.className = " cmeIframeContainer" then ConsoleWrite ($oDiv.className & @CRLF) $oObject = $oDiv.firstElementChild ExitLoop EndIf Next MsgBox ($MB_SYSTEMMODAL,"",ObjName($oObject) & "/" & $oObject.id) But then the frame object seems empty, no tagcollection is working, empty...
  8. yes i see that but: line 14 the ini is created like so: IniWrite($inifile, $standard, $keynames & $num, $Loop) result: [chopchop] key001=0 key002=1 key003=2 key004=3 key005=4 key006=5 key007=6 key008=7 key009=8 key010=9 key011=10 etc then further down: line 24 the ini is overwritten with the new data like so: IniWrite($inifile, $standard, $ini[$Loop][0], $ini[$Loop][1]) result: [chopchop] key001=f5C key002=f1D key003=f2A key004=b3A key005=e6D key006=a4C key007=c5B key008=c2D key009=f2D key010=a2A etc. no FileOpen() needed there for the overwrite why will that not work a third time? because only after that i must use the FileOpen() function somehow i was expecting that line 24 and line 44 (the third IniWrite() would both work without a FileOpen() because it worked the first time. i do not quite understand why it works one time and not the other. it does not make sense to me somehow.
  9. You want too much from ScitE in this case: Even when you find a way to make everything work as you would like described in your first paragraph, then remembering all aopen files is something that doesn't work as there is only one file that info is written in and thus contains all tabs of the last closed SciTE. I am not even going to try to think about how to make this work as I really can't see the purpose of wanting this. Jos
  10. Because using the flag 2 means 'overwrite' Just run a test using your previous script, with the FileOpen line commented or not, and then count the lines in the final ini file in both cases
  11. oh yes mikell, you are right. i forgot the function. just for sake of completation: #include <Array.au3> Global $inifile = "nothing.ini" Global $standard = "chopchop" Global $keynames = "key" If FileExists($inifile) = 1 Then MsgBox(0, "YES", "File does exist!") ElseIf FileExists($inifile) = 0 Then MsgBox(0, "NO", "File does not exist") For $Loop = 0 To 150 $num = StringRight("00" & $Loop + 1, 3) IniWrite($inifile, $standard, $keynames & $num, $Loop) ;-- why is it "$num, $Loop" and not "$num & $Loop"? Next Global $ini = IniReadSection($inifile, "chopchop") For $Loop = 1 To $ini[0][0] $ini[$Loop][1] = _Randomizer(1) Next For $Loop = 1 To UBound($ini) - 1 IniWrite($inifile, $standard, $ini[$Loop][0], $ini[$Loop][1]) Next MsgBox(0,"SUCCESS", "ini-file was saved.") Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "see duplicates?") FileOpen($inifile, 2) ;-- why do i have to open the file while above i did not need to do that before writing the ini? Global $aTmp = _ArrayUnique($ini, 1, 0, 0, 0, 0) Global $aOut[UBound($aTmp)][UBound($ini, 2)] For $i = 0 To UBound($aOut) - 1 $nums = StringRight("00" & $i + 1, 3) ;$aOut[$i][0] = $keynames & $nums & $i ---> total garbage will not do anything that is supposed to do. $aOut[$i][0] = $keynames & StringFormat("%03d", $i) $aOut[$i][1] = $aTmp[$i] Next For $i = 1 To UBound($aOut) - 1 IniWrite($inifile, $standard, $aOut[$i][0], $aOut[$i][1]) Next $aTmp = 0 Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "still duplicates?") EndIf Func _Randomizer($length) $String = "" $aChars = StringSplit("abcdefg", "") $sString = "" $bChars = StringSplit("ABCDEFG", "") $bString = "" $cChars = StringSplit("1234567", "") $cString = "" $i=0 Do If $length<=0 then ExitLoop $String &= $achars[Random(1,$achars[0])]&$cchars[Random(1,$cchars[0])]&$bchars[Random(1,$bchars[0])] $i += 1 Until $i = $length Return $String EndFunc
  12. got it. thanks. i just changed, like you suggested: $aOut[$i][0] = $keynames & $i to: $aOut[$i][0] = $keynames & StringFormat("%03d", $i) then i have the values all numbered nice and neatly. i would never have looked at StringFormat if you had not mentioned it and shown me an example. does not solve the mystery why i have to FileOpen() first before writing the ini, whilst above the ini was created and then rewritten without having to use the FileOpen() function. but as long as it works, i am happy. thanks
  13. roeselpi, make sure you understand StringFormat to get the clear idea of what it does ,to remove the prefix use Number() #include <Array.au3> Local $array = [["name 0", "Peter"], ["name 1", "Paul"], ["name 2", "Mary"], ["name 3", "Mary"], ["name 4", "Charles"], _ ["name 5", "Elizabeth"], ["name 6", "Victoria"], ["name 7", "Mary"], ["name 8", "Tom"], ["name 9", "Paul"]] Local $sd = ObjCreate("Scripting.Dictionary") For $i = 0 To UBound($array) - 1 If $sd.Exists($array[$i][1]) Then ContinueLoop $sd.Item($array[$i][1]) = $array[$i][1] Next Local $a = $sd.Items _ArrayColInsert($a, 0) _ArrayDisplay($a) For $i = 0 To UBound($a) - 1 $a[$i][0] = StringFormat("%05d", $i) Next _ArrayDisplay($a) Deye
  14. Bea, 26 posts and you appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing game automation - before you post again and then you will understand why you will get no help and this thread will now be locked. M23
  15. Thank you, I corrected it to sqlite3.dll
  16. i can not get it to work the way i want. it is quite frustrating. i have been trying about 100 different possible solutions, but it just will not do it the way i would like it to be. at first it looked very successful, but my lack of understanding keeps making it very hard for me to adapt a code to get where i want it to be. to make it a bit more clear, i have made a simple example with the generation of an ini file with random entries (had a lot of help with that from "BrewManNH" in this thread: replace data in infile for that) to make clear what i am getting at and where the problem is it will generate 150 radom entries consisting of 3 digits and here you can easily see what i mean with the first two digits being able to be identical and the third digit is the one which causes the duplicate entry. after deleting the duplicates it would leave you with about 101-115 unique entries that are not duplicated. but on the first generation the numerals are all right and after the unique check/delete the numbers all get a different amount of digits and that is annoying. #include <Array.au3> Global $inifile = "nothing.ini" Global $standard = "chopchop" Global $keynames = "key" If FileExists($inifile) = 1 Then MsgBox(0, "YES", "File does exist!") ElseIf FileExists($inifile) = 0 Then MsgBox(0, "NO", "File does not exist") For $Loop = 0 To 150 $num = StringRight("00" & $Loop + 1, 3) IniWrite($inifile, $standard, $keynames & $num, $Loop) ;-- why is it "$num, $Loop" and not "$num & $Loop"? Next Global $ini = IniReadSection($inifile, "chopchop") For $Loop = 1 To $ini[0][0] $ini[$Loop][1] = _Randomizer(1) Next For $Loop = 1 To UBound($ini) - 1 IniWrite($inifile, $standard, $ini[$Loop][0], $ini[$Loop][1]) Next MsgBox(0,"SUCCESS", "ini-file was saved.") Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "see duplicates?") FileOpen($inifile, 2) ;-- why do i have to open the file while above i did not need to do that before writing the ini? Global $aTmp = _ArrayUnique($ini, 1, 0, 0, 0, 0) Global $aOut[UBound($aTmp)][UBound($ini, 2)] For $i = 0 To UBound($aOut) - 1 $nums = StringRight("00" & $i + 1, 3) ;$aOut[$i][0] = $keynames & $nums & $i ---> total garbage will not do anything that is supposed to do. $aOut[$i][0] = $keynames & $i $aOut[$i][1] = $aTmp[$i] Next For $i = 1 To UBound($aOut) - 1 IniWrite($inifile, $standard, $aOut[$i][0], $aOut[$i][1]) Next $aTmp = 0 Global $ini = IniReadSection($inifile, "chopchop") _ArrayDisplay($ini, "still duplicates?") EndIf i spotted the duplicates later down the line but with a unique check, i can eliminate the duplicates and that saves like 20-30 minutes during testing whilst doing it manually. i tested the other version as well from iamtheky and there no unique single key will be left. all duplicates will be removed but one of them should remain because one is the first and original, so that was not the right thing to go with. i just do not understand where i am going wrong at present.
  17. Hey Deye, thanks for your replay, my code is verry simple, #include <MsgBoxConstants.au3> Local $sFilePath1 = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Code") Local $sFilePath = RegRead("HKEY_CURRENT_USER\Software\JavaSoft\Prefs\elo\clients\hardware", "Ticket") MsgBox($MB_SYSTEMMODAL, "", "Der letzte Wettschein lautet: " & $sFilePath & " $ " & $sFilePath1)
  18. svenjatzu, its possible to make it work but its really up to you make it, Maybe simpler to walk the process through starting with FileOpenDialog() .. if you already have any code for this and still cant make it work then post it here to get more help Deye
  19. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Price Checker", 371, 57, 2453, 151) $Label1 = GUICtrlCreateLabel("Avantoe potion (unf)", 24, 16, 100, 17) $Check = GUICtrlCreateButton("Check", 136, 16, 75, 17) $Input1 = GUICtrlCreateInput("Checked Price", 224, 16, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Hey guy, i am trying to make a litte gui to check a price in an video game but i have no clue how i get the price in the Input box This gui should get the price via source cod when somone click the button an put it in the check box, but i have no clue how the cod this can somone help a noob girl Notice: if you maybe go to the site the prices have changend, when i made the picture it was +50 Link: from the site to check https://www.ge-tracker.com/item/avantoe-potion-unf
  20. Oh! really. I think autoit can make this. So I will try custom Gui. Thank you.
  21. You would have to build your own custom gui, or add a MsgBox with Yes/No "Do you want to include subfolders" after the selection.
  22. Hi there. I want to add my FileSelectFolder function with "include subdirectories Checkbox". The example image is shown in below.
  23. This is the definition for the frame you referenced in the image -- <iframe src="https://cmegroup-tools.quikstrike.net/User/QuikStrikeTools.aspx?viewitemid=IntegratedFedWatchTool" style="width: 100%; height: 885px; overflow: hidden; border: 0px none;" scrolling="no" id="cmeIframe-yoymbhus" class="cmeIframe" frameborder="0"></iframe> It doesn't have a given name, so using _IEFrameGetObjByName is not an option. But you still need to get a reference to the frame object in order to access it contents. You can use _IEFrameGetCollection with an index value (I believe 0 will work in this case ) or you could use _IEGetObjById,
  24. You can. It would require to check the windows API deeply and I have not time to do it. I think you could handle easily using Windows Automation Functions. Saludos
  25. Thanks : ) But im not shure if thats what im looking for. what i need is that the file autmatically executes when i paste it to another folder. Just like i copy it from my pc and past it to another pc, in the moment when its copied to the other pc it should execute without that i need to run it on my own
  1. Load more activity
×
×
  • Create New...