All Activity

This stream auto-updates   

  1. Today
  2. The bin files in the archive gave my virus scanner a fit I had to un7z with the command line to even get it on my machine Flat assembler is for sure the way to go... way better than looking up opcodes!! Thanks
  3. I still get the same error, which come from IEbyXPath.au3 file. Within IEbyXPath.au3 file, it contains following files, do I need to place those files under the same directory as well? if yes, where to get those files? #include <ie.au3> #include <array.au3 Do you have any suggestions? Thank you very much for any suggestions (^v^)
  4. Yesterday
  5. Change the parameter for $xlpart to $xlwhole. _Excel_RangeReplace($oWorkbook, Default, "E2:E1000", int(1), 0, $xlwhole)
  6. Maybe your server require some security like SSL or TLS ?
  7. Try: #include "IEbyXPath.au3" $oIE = _IECreate("Google.com") _IELoadWait($oIE) Sleep(5000) ;~ Wait 5 seconds, extend it if you still get an error $oInput = _IEGetObjById($oIE,'lst-ib') _IEFormElementSetValue($oInput,"test") _IEAction($oInput,"blur") $sXpath = "//li[@class='sbsb_c gsfs')]//div[@class='sbqs_c']" $aReturnResults = BGe_IEGetDOMObjByXPathWithAttributes($oIE,$sXpath,5000) For $i = 0 To UBound($aReturnResults)-1 $aReturnResults[$i] = $aReturnResults[$i].Innertext Next _ArrayDisplay($aReturnResults)
  8. I am writing an AutoIT script that searches for values that are less than 5 from the range E2:E1000 (these values could only possibly be 1, 2, 3, or 4 in my case) and changes these values to 0. Using _Excel_RangeReplace, I am able to do this, but I have a problem. The problem is that any values above 5 that have a 1 in it (for example, 111 or 4912) are also changed to 0. How can I make it so that only the values 1, 2, 3, or 4 are changed to 0? _Excel_RangeReplace($oWorkbook, Default, "E2:E1000", int(1), 0) _Excel_RangeReplace($oWorkbook, Default, "E2:E1000", int(2), 0) _Excel_RangeReplace($oWorkbook, Default, "E2:E1000", int(3), 0) _Excel_RangeReplace($oWorkbook, Default, "E2:E1000", int(4), 0) This is the code I have so far for this.
  9. I copy the first post to a new Scite document, and delete following section and save that as D:\Scripts\IEbyXPath.au3 #region SAMPLE ... #endregion SAMPLE After compile and run it, an error occurs on line 5399 within IEbyXPath.au3 file as shown on below image, Furthermore, I also test IEbyXPath.au3 with given SAMPLE by compiling IEbyXPath.au3 and run IEbyXPath.exe, I also get the same error. Do you have any suggestions on what wrong it is? Thank you very much for any suggestions (^v^)
  10. You can use the Unicode codepoints mentionned here:
  11. Many Thanks! But i'm getting an error: _POP3_ServerConnect: connecting to: xxx.xxxxx.com - using port: 110 xxx.xxxxxx.com >> xx.xxx.xxx.xxx ! [ 10060 / 0 ] _POP3_ServerConnect: Error: $POP3_ERR_TCPCONNECT I think is not a problem with the port or server name because same values are working with two command line pop clients: popclient (very good) and a quiet old 'getmail for windows' (not the same as this other getmail that looks very proffesional but difficult to install on windows) The hosting provider I am using is Dreamhost. I've tested changing server name for 'cluster name' as explained here: Email client configuration overview Email client protocols and port numbers But always the same error codes: 5, extended 10060 Tested in XP and Windows 10
  12. Hmm. It looks like that you save the changes (in saveeditedmsg func) before reading the new combo value Func saveeditedmsg(); save or rename modified section If $secn <> $secno Then $iMsgBoxAnswer = MsgBox(3, "NEW/RENAME", "Press YES to Add this as NEW section" & @CRLF & "Press NO to rename and save this section from " & $secno & "To" & $secn) Select Case $iMsgBoxAnswer = 6 ;YES $secn = $secno msgbox(0,"before save", $secn) ; <<<< old value save($secn) ; <<<<<<< new values saved here $secn = GUICtrlRead($SecSel) ; <<<<<< combo read here msgbox(0,"after save", $secn) ; <<<< new value $secno = $secn Case 7 ;NO ; <<<<<< should be "Case $iMsgBoxAnswer = 7" or "Case Else"
  13. Syntax looks correct, normally I would write the script like so, it's basically the same as your script except with some error handling, hope it makes sense. Local $sSrcPath = @ScriptDir & "\Guideone" If FileExists($sSrcPath) = 0 Then Exit MsgBox(16, "Error", "Source File: " & $sSrcPath & " doe's not exist.") Local $sTgtPath = IniRead(@ScriptDir & "\Path.ini", "Path", "Path", "Error") If $sTgtPath = "Error" Then Exit MsgBox(16, "Error", "Error Reading Ini.") Local $hDirCopy = DirCopy ($sSrcPath, $sTgtPath, 1) ;~ Flag 1 means overwrite existing folder If $hDirCopy = 1 Then MsgBox(64, "Success", "Copied:" & @CRLF & @TAB & $sSrcPath & @CRLF & " To: " & @CRLF & @TAB & $sTgtPath) Else MsgBox(16, "Failure", "Error Copying:" & @CRLF & @TAB & $sSrcPath & @CRLF & " To: " & @CRLF & @TAB & $sTgtPath) EndIf
  14. As I said you need to go to the first post of the link I provided above, copy the code in the first post to a new Scite document, save that as D:\Scripts\IEbyXPath.au3, you can copy it to C:\Program Files (x86)\AutoIt3\Include if you wanted.
  15. I've been asked to write a script that will do this: It will start with a UTF-16 text file with Arabic or Hebrew text, including line numbering, like this: 1. tfeL-to-thgiR ("tfeL-to-thgiR" represents real Right-to-Left text.) What I want the script to do is insert a Right-To-Left code after the numeral "1" and (I think) after the "." so that the "1." will appear at the right of the text, like this: tfeL-to-thgiR .1 Normally, numerals are coded Left-to-Right, so all Windows apps put the "1." on the left side of the text. What I see online is that the way to fix this is put an RTL code after the number (and maybe the punctuation) in order to accomplish this. So I got the idea that I could search for this binary string: 0D 00 0A 00 31 00 and insert the RTL code after it. The internet tells me that the UTF-16 code for this mark is 20 0F. I found a _BinaryReplace function here: and I tried to use it this way (replacing only the line numbering "1." for simplicity): $sInFile = "infile.txt" ; Original in file $sFind = "0D000A003100" ; MSFT 5.0 Original hex to find ; this is rtl code: "20 0F" $sReplace = "0D000A003100200F" ; SMASHLY! New hex to replace $sOutFile = "outfile.txt" ; New edited out file _BinaryReplace($sInFile, $sFind, $sReplace, $sOutFile) But I ended up with a degree sign next to the numeral 1. Am I missing something obvious? Thanks for any help.
  16. Greetings everyone, I'm writing a software that edit an ini file section by section with adding/renaming abilities but whenever I manually change the combobox to value other than constducted previously, I cannot get this value. THIS is a clean version of the code: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiStatusBar.au3> #include <GuiEdit.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form=C:\Program Files (x86)\AutoIt3\SciTE\Koda\Forms\QuickRepEditList7.kxf $SecMgr = GUICreate("Sections Manager", 1159, 690) GUISetFont(12, 800, 0, "MS Sans Serif") $EditSec = GUICtrlCreateEdit("", 45, 45, 1090, 644, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_HSCROLL, $ES_NOHIDESEL)) $Edit2 = GUICtrlCreateEdit("", 11, 45, 33, 617, BitOR($ES_RIGHT, $ES_READONLY, $ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat(" 1:\r\n 2:\r\n 3:\r\n 4:\r\n 5:\r\n 6:\r\n 7:\r\n 8:\r\n 9:\r\n10:\r\n11:\r\n12:\r\n13:\r\n14:\r\n15:\r\n16:\r\n17:\r\n18:\r\n19:\r\n20:\r\n21:\r\n22:\r\n23:\r\n24:\r\n25:\r\n26:\r\n27:\r\n28:\r\n29:\r\n30:")) $Label1 = GUICtrlCreateLabel("Select Section:", 7, 13, 126, 24) GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif") $Savesec = GUICtrlCreateButton("Save Changes", 375, 7, 129, 33) $NewSec = GUICtrlCreateButton("New Section", 700, 7, 121, 33) $SecDwn = GUICtrlCreateButton("Section Down", 830, 7, 137, 33) $SecUp = GUICtrlCreateButton("Section Up", 980, 7, 129, 33) $copystrs = GUICtrlCreateButton("*******", 507, 7, 73, 33) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $HeavySep = GUICtrlCreateButton("====", 581, 7, 73, 33) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") Global $SecSel Global $secno Global $secn = "NULLz" Global $sFilePathtemp Global $aArray Global $SecNames Global $secnnew Global $ssecn $SecSel = GUICtrlCreateCombo("", 110, 10, 257, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) queysecs() Filledit() GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $secno=GUICtrlRead($SecSel) $changed=0 While 1 $secn = GUICtrlRead($SecSel) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE saveeditedmsg() Exit Case $SecSel $secno=GUICtrlRead($SecSel) queysecs() Filledit() Case $Savesec saveeditedmsg() queysecs() Case $NewSec Case $SecDwn Case $SecUp Case $copystrs ClipPut("**************************************************************************************************************************************************************") Case $HeavySep ClipPut("==============================================================================================================================================================") EndSwitch WEnd Func queysecs();query section names $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" $aArray = IniReadSectionNames($sFilePath) $SecNames = $aArray[1] If $secn = "NULLz" Then $secn = $aArray[1] EndIf If Not @error Then For $i = 2 To $aArray[0] $SecNames = $SecNames & "|" & $aArray[$i] Next GUICtrlSetData($SecSel, "", "") GUICtrlSetData($SecSel, $SecNames, $secn) $secno = $secn EndIf EndFunc ;==>queysecs Func Filledit(); transfer section values on the edit box GUICtrlSetData($EditSec, "") $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" For $i = 1 To 30 $sRead = IniRead($sFilePath, $secn, $i, "") GUICtrlSetData($EditSec, $sRead & @CRLF, 1) Next GUISetState(@SW_SHOW) EndFunc ;==>Filledit Func saveeditedmsg(); save or rename modified section If $secn <> $secno Then $iMsgBoxAnswer = MsgBox(3, "NEW/RENAME", "Press YES to Add this as NEW section" & @CRLF & "Press NO to rename and save this section from " & $secno & "To" & $secn) Select Case $iMsgBoxAnswer = 6 ;YES $secn = $secno save($secn) $secn = GUICtrlRead($SecSel) $secno = $secn Case 7 ;NO $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" IniRenameSection($sFilePath, $secno, $secn) save($secn) $secn = GUICtrlRead($SecSel) $secno = $secn EndSelect Else $iMsgBoxAnswer = MsgBox(4, "Do you want to save changes to this section", "Save Section: " & $secn) Select Case $iMsgBoxAnswer = 6 ;yes save($secn) EndSelect EndIf EndFunc ;==>saveeditedmsg ;MsgBox(4, "Do you want to add this to Database?",$secn) Func save($ssecn); save edit control to a file and then rewrite modified values by line order. $sFilePathtemp = FileOpen(@ScriptDir & "\" & "tempo.quickrep", $FO_READ + $FO_OVERWRITE + $FO_CREATEPATH + $FO_UTF8) $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" FileWrite($sFilePathtemp, GUICtrlRead($EditSec)) $sFilePathtemp = FileOpen(@ScriptDir & "\" & "tempo.quickrep", $FO_READ + $FO_UTF8) For $i = 1 To 30 $sRead = FileReadLine($sFilePathtemp, $i) IniWrite($sFilePath, $ssecn, $i, $sRead) Next GUISetState(@SW_SHOW) EndFunc ;==>save And this is with som test msg boxes to know how to get it #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiStatusBar.au3> #include <GuiEdit.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form=C:\Program Files (x86)\AutoIt3\SciTE\Koda\Forms\QuickRepEditList7.kxf $SecMgr = GUICreate("Sections Manager", 1159, 690) GUISetFont(12, 800, 0, "MS Sans Serif") $EditSec = GUICtrlCreateEdit("", 45, 45, 1090, 644, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_HSCROLL, $ES_NOHIDESEL)) $Edit2 = GUICtrlCreateEdit("", 11, 45, 33, 617, BitOR($ES_RIGHT, $ES_READONLY, $ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat(" 1:\r\n 2:\r\n 3:\r\n 4:\r\n 5:\r\n 6:\r\n 7:\r\n 8:\r\n 9:\r\n10:\r\n11:\r\n12:\r\n13:\r\n14:\r\n15:\r\n16:\r\n17:\r\n18:\r\n19:\r\n20:\r\n21:\r\n22:\r\n23:\r\n24:\r\n25:\r\n26:\r\n27:\r\n28:\r\n29:\r\n30:")) $Label1 = GUICtrlCreateLabel("Select Section:", 7, 13, 126, 24) GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif") $Savesec = GUICtrlCreateButton("Save Changes", 375, 7, 129, 33) $NewSec = GUICtrlCreateButton("New Section", 700, 7, 121, 33) $SecDwn = GUICtrlCreateButton("Section Down", 830, 7, 137, 33) $SecUp = GUICtrlCreateButton("Section Up", 980, 7, 129, 33) ;$LineNo = GUICtrlCreateInput("LineNo", 664, 7, 65, 28) $copystrs = GUICtrlCreateButton("*******", 507, 7, 73, 33) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $HeavySep = GUICtrlCreateButton("====", 581, 7, 73, 33) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") Global $SecSel Global $secno Global $secn = "NULLz" Global $sFilePathtemp Global $aArray Global $SecNames Global $secnnew Global $ssecn $SecSel = GUICtrlCreateCombo("", 110, 10, 257, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) queysecs() Filledit() GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $secno=GUICtrlRead($SecSel) $changed=0 While 1 $secn = GUICtrlRead($SecSel) ;If $secn <> $secno and $changed=0 Then ; $secns = $secn ; $changed=1 ;EndIf $nMsg = GUIGetMsg() ;MsgBox(4, "TEST1?", $secn) Switch $nMsg Case $GUI_EVENT_CLOSE saveeditedmsg() Exit Case $SecSel ;MsgBox(4, "TEST?", GUICtrlRead($SecSel)) ;MsgBox(4, "TEST1?", $secns) ;MsgBox(4, "TEST2?", $secn) $secno=GUICtrlRead($SecSel) ;saveeditedmsg() queysecs() Filledit() ;$changed=0 Case $Savesec saveeditedmsg() queysecs() Case $NewSec Case $SecDwn Case $SecUp Case $copystrs ClipPut("**************************************************************************************************************************************************************") Case $HeavySep ClipPut("==============================================================================================================================================================") EndSwitch ; MsgBox(4, "TEST2?", $secn) WEnd Func queysecs();query section names $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" $aArray = IniReadSectionNames($sFilePath) $SecNames = $aArray[1] ; MsgBox(4, "test3?", $secn) If $secn = "NULLz" Then $secn = $aArray[1] EndIf If Not @error Then For $i = 2 To $aArray[0] $SecNames = $SecNames & "|" & $aArray[$i] Next GUICtrlSetData($SecSel, "", "") GUICtrlSetData($SecSel, $SecNames, $secn) $secno = $secn ;MsgBox(4, "test4?", $secn) EndIf EndFunc ;==>queysecs Func Filledit(); transfer section values on the edit box GUICtrlSetData($EditSec, "") $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" For $i = 1 To 30 $sRead = IniRead($sFilePath, $secn, $i, "") GUICtrlSetData($EditSec, $sRead & @CRLF, 1) Next GUISetState(@SW_SHOW) EndFunc ;==>Filledit Func saveeditedmsg(); save or rename modified section If $secn <> $secno Then $iMsgBoxAnswer = MsgBox(3, "NEW/RENAME", "Press YES to Add this as NEW section" & @CRLF & "Press NO to rename and save this section from " & $secno & "To" & $secn) Select Case $iMsgBoxAnswer = 6 ;YES $secn = $secno save($secn) $secn = GUICtrlRead($SecSel) $secno = $secn Case 7 ;NO $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" IniRenameSection($sFilePath, $secno, $secn) save($secn) $secn = GUICtrlRead($SecSel) $secno = $secn EndSelect Else $iMsgBoxAnswer = MsgBox(4, "Do you want to save changes to this section", "Save Section: " & $secn) Select Case $iMsgBoxAnswer = 6 ;yes save($secn) EndSelect EndIf EndFunc ;==>saveeditedmsg ;MsgBox(4, "Do you want to add this to Database?",$secn) Func save($ssecn); save edit control to a file and then rewrite modified values by line order. $sFilePathtemp = FileOpen(@ScriptDir & "\" & "tempo.quickrep", $FO_READ + $FO_OVERWRITE + $FO_CREATEPATH + $FO_UTF8) $sFilePath = @ScriptDir & "\" & "Txt_Reps.ini" FileWrite($sFilePathtemp, GUICtrlRead($EditSec)) $sFilePathtemp = FileOpen(@ScriptDir & "\" & "tempo.quickrep", $FO_READ + $FO_UTF8) For $i = 1 To 30 $sRead = FileReadLine($sFilePathtemp, $i) IniWrite($sFilePath, $ssecn, $i, $sRead) Next GUISetState(@SW_SHOW) EndFunc ;==>save The ini file withthe au3 attached This is how I want: when the user changes the combo, the script will check the text combo. In case of changed text it will ask user if I should rename or add it as a new section and then save. If not changed the text of combo it will ask to save only. IF NOT possible, Will it possible with _GUICtrlComboBox__GUICtrlComboBoxEx_Create or _GUICtrlComboBoxEx_Create or not THANK you very much in advance QuickSecEdit.zip
  17. The easiest way to write assembler code in AutoIt is to use flat assembler because there is a fasm.dll that contains all the functions you need. In this post you can find a short instruction and a small but complete UDF to use the functions in fasm.dll.
  18. I can't find anything on the forums through the search bar. However it is strange to me that it works in my test code but when the same exact values go into my real code is when I experience issues. When I check the values they all show up how they should, but when I divide $var3/$var2 in my actual code I get something ridiculous.
  19. Earthshine, Despite the OP's rather insulting classification of forum members as "nerds" we should still remain polite. Please refrain from adding posts such as the one above which says more about you than the OP. M23
  20. MsgBox( $MB_SYSTEMMODAL, "", "$var3/$var2: " + $var3/$var2 ) ;Shows 253 I typed this line incorrectly in my test code. However, I ended up restarting Scite and it started working... Not sure why it was giving me 253 for 250/100.
  21. Tumble, Welcome to the AutoIt forums. It looks like you have fallen foul of the "floating point maths" problem - it affects all computers and is not an AutoIt problem per se. Search the forum and you will find many instances of people running into the same problem - and how to solve it. M23
  22. ROBOCOPY is where anything copy is at
  23. m4rcin93, Try opening the files before playing them - this works for me: #include <Array.au3> #include <Sound.au3> $aFile = FileReadToArray("file.txt") ; Add another column _ArrayColInsert($aFile, 1) For $x = 0 To Ubound($aFile) - 1 ; Open each file before playing and store the ID $aFile[$x][1] = _SoundOpen($aFile[$x][0]) ; Now play the file _Soundplay($aFile[$x][1], 0) Sleep(1000) Next ; Close the files when terminated $iStopped = 0 Do For $x = 0 To UBound($aFile) - 1 ; Check if track ended and not already closed If ($aFile[$x][1] <> 1) And (_SoundStatus($aFile[$x][1]) = "stopped") Then ; Close the file _SoundClose($aFile[$x][1]) ; Set the flag to indicate this $iStopped += 1 EndIf Next ; Save the CPU Sleep(1000) Until $iStopped = 3 M23
  24. #include <MsgBoxConstants.au3> $var1 = 250000 $var2 = $var1 / 2500 $var3 = 250 MsgBox( $MB_SYSTEMMODAL, "", "$var1: " + $var1 ) ;Shows 250000 MsgBox( $MB_SYSTEMMODAL, "", "$var2: " + $var2 ) ;Shows 100 MsgBox( $MB_SYSTEMMODAL, "", "$var3: " + $var3 ) ;Shows 250 MsgBox( $MB_SYSTEMMODAL, "", "$var3/$var2: " + $var2/$var2 ) ;Shows 1 Here is my code snippet that is acting up. For some reason the variables go in correctly, but they don't come out correctly. Basically my program gets a value from a website, then tries to divide it by another value it gets from that website, and then finally divide it by a number from a database. All of my test values come from the website and my database just fine, it's just this little part of the code. From some reason my code is showing my $var3/$var2 = 1 where it should give me 2.5. Can anyone explain to me why this is happening? It happens both in my actual code and in this little test snippet.
  25. Hello. I want to add playlist to my MP3 Player. To array i added 3 songs, i wanted to when first song finished, start 2nd song but it doesn't work. It's works only with _soundplay($aaa, 1) - with flag 1, i want do it with flag 0. How to do it? $file = FileReadToArray("file.txt") For $x = 0 To Ubound($file) -1 $test = _Soundplay($file[$x],0) Next
  1. Load more activity