Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hi Guys, Apparently the problem is "Citrix" as it uses a cut-down version of IE6 as an interface, which excludes certain functionality. AutoIT sends the correct command to Citrix, but as the IE6 has been stripped down it doesn't include that functionality any more. The workaround is to use send({LWINDOWN}{UP}{LWINUP}) which does the trick. Thanks to everyone who helped. Hopefully one day I will as knowledgable as you peeps 🙂
  3. Hi guys, I am still learning the ropes, so apologies if I have missed something obvious. Basically, the #include statement is not working for me (unless I include the full pathname) e.g. #include <Date.au3> MsgBox(0,'',"The time is:" & _NowTime()) The above example returns the following error; #include <Date.au3> Error opening the file I tried removing/reinstalling Autoit3, but to no avail. I have tried installing AutoIt3 firstly in Programs & then when that didn't work, I un-installed it again and re-installed it in Programs(x86). Have also tried using both AutoIt3.exe and AutoIt3_x64.exe versions, but each time it is the same error. The only way that the above script (or any script) works is if I run it from within SciTE, or use the full pathname e.g. #include "C:\Folder, etc, etc" Has anyone else encountered such problems? Many thanks, Pete
  4. I am curious if this code could work on 300,000 rows. I have Excell 2003, so I am limited to 65k rows. But the result is quite fast. Maybe you could try it : #include <Excel.au3> #include <MsgBoxConstants.au3> Local $oExcel = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error creating the Excel application object.") Local $oWorkbook = _Excel_BookOpen($oExcel, "65000.xls") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error opening Workbook") _Excel_RangeSort($oWorkbook, Default, Default, "A:A") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error sorting data.") Local $iPrev = 1 Local $aResult = _Excel_RangeRead($oWorkbook, Default, "A:A") For $i = 2 to 10 $iFound = _ArraySearch ($aResult,$i,$iPrev-1,0,0,0,1,0) MakeCopy ($iPrev, $iFound, @ScriptDir & "\T" & $i-1 & ".xls") $iPrev = $iFound+1 Next MakeCopy ($iPrev, UBound ($aResult), @ScriptDir & "\T10.xls") Func MakeCopy ($iStart, $iEnd, $sName) Local $oRange = $oWorkbook.ActiveSheet.Range("A" & $iStart & ":N" & $iEnd) Local $oWB = _Excel_BookNew ($oExcel, 1) _Excel_RangeCopyPaste($oWB.ActiveSheet, $oRange, "A1") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error copying cells." & "/" & @error) _Excel_BookSaveAs($oWB, $sName, $xlWorkbookNormal, True) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error saving as" & "/" & @error) _Excel_BookClose ($oWB,False) EndFunc
  5. Today
  6. Sorry but I don't understand what you mean by " use Autoit's sql commands on top ". You just query the SQLite database with the SQLite.au3 UDF. Again if your source Excel file will change, the DB must be changed accordingly, so going thru SQLite isn't beneficial (details may muddy the border). But if the Excel file is given once for all, you can most probably benefit from the power of SQLite queries, including add-on functions if necessary. For instance, recent SQLite versions offer windowing features, full text table search (legacy feature), and a lot more. It all depends on the needs you have and the complexity of your queries. The nice thing is that SQLite doesn't need any installation nor maintenance, contrary to "heavy" client-server DB engines.
  7. Once its accessed via ADO, and extract it into a SQLite DB (as jchd said), would you then use Autoit's sql commands on top, or would you just access it via a SQLite and use sql commands?
  8. Macro BlockInput(bool) BlockInput_(bool) EndMacro BlockInput(1) Delay(3000) BlockInput(0)
  9. @jdelaney I'm traveling now and when I go back I'll do the tests, thanks for the tips.
  10. Updating the code I will try to simplify as much as possible the last functions
  11. What's New in Version 0.2019.04.19 fixed: GetProcessTimes() crashing on multi-user setup The code is in the downloads area.
  12. Internet search engine use https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getdrivetypea DRIVE_UNKNOWN = 0
  13. @AZJIO Hello friend the first example requires a correction ( Line 83:Constant not found : #DRIVE_UNKNOWN ) thank you
  14. Epicface, FrancescoDiMuro is quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again. Thread locked. But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. M23
  15. The good sense to read forum rules, since game automation is not allowed on these forums.
  16. If that's OK then you can get rid of the first column, since it's just a redundant decoration of the row number, i.e. the index thru the array. That will simplify code some more. If you want to save the simplified array while adding the "name #" prefix, you can do that while going thru the array for output. Also I still don't understand what you meant whith "A1Peter...": the A1, B2 C3 prefixes jump in your post but have no materialization in the code sample you supplied. That's why I ignored that sentence.
  17. I dug and created something like that. However, once he clicks the right one, then he does not repeat it anymore. What should I add?
  18. Element? Is it faster? I want to automate gaining things in the game. When she appears in this place, she wants to take her. There are 3 things. Two concern me, one does not concern me, so I have to use two colors.
  19. EnableExplicit Define ini$ ini$ = GetPathPart(ProgramFilename()) + GetFilePart(ProgramFilename(), #PB_FileSystem_NoExtension) + ".ini" Procedure.s IniRead(filename$, section$, key$, def$ = "") Protected res$ If OpenPreferences(filename$) If PreferenceGroup(section$) res$ = ReadPreferenceString(key$, def$) EndIf ClosePreferences() EndIf ProcedureReturn res$ EndProcedure Procedure IniWrite(filename$, section$, key$, value$) Protected res If FileSize(filename$) < 0 ; CreateFile(0, filename$) ; WriteString(0, #CRLF$) ; CloseFile(0) CreatePreferences(filename$) ClosePreferences() EndIf If OpenPreferences(filename$) PreferenceGroup(section$) res = WritePreferenceString(key$, value$) ClosePreferences() EndIf ProcedureReturn res EndProcedure Procedure IniDelete(filename$, section$, key$ = "") If OpenPreferences(filename$) If key$ = "" RemovePreferenceGroup(section$) Else If PreferenceGroup(section$) RemovePreferenceKey(key$) EndIf EndIf ClosePreferences() EndIf EndProcedure IniWrite(ini$, "Set", "KeyWin", "new_value") MessageRequester("Here it is", IniRead(ini$, "Set", "KeyWin", "Default value")) IniDelete(ini$, "Set", "KeyWin") IniDelete(ini$, "Set") ; EnableExplicit ; Define ini$ ; ini$ = GetPathPart(ProgramFilename()) + GetFilePart(ProgramFilename(), #PB_FileSystem_NoExtension) + ".ini" ; Make the ini-file was not empty Procedure IniReadSectionNames(filename$, List Groups.s()) If OpenPreferences(filename$) ExaminePreferenceGroups() While NextPreferenceGroup() AddElement(Groups()) Groups() = PreferenceGroupName() Wend ClosePreferences() EndIf EndProcedure NewList Groups.s() IniReadSectionNames(ini$, Groups()) Define List1.s ForEach Groups() List1 + Groups() + #CRLF$ Next MessageRequester("List", List1) Procedure IniReadSection(filename$, section$, Map key_value.s()) If OpenPreferences(filename$) If PreferenceGroup(section$) ExaminePreferenceKeys() While NextPreferenceKey() AddMapElement(key_value(), PreferenceKeyName()) key_value() = PreferenceKeyValue() ; key_value(PreferenceKeyName()) = PreferenceKeyValue() Wend EndIf ClosePreferences() EndIf EndProcedure NewMap key_value.s() IniReadSection(ini$, "Set", key_value()) Define Map1.s ForEach key_value() Map1 + MapKey(key_value()) + " = " + key_value() + #CRLF$ Next MessageRequester("Map", Map1)
  20. The best way is to click in the specyfic element, not in color. Could you be more specific in the description of what you are trying to automate?
  21. Hello, I'm just starting with autoit. I have a question. I wrote a short script. How do you add to it to check if the given coordinate is in a given color, if so, then click the right mouse button? It's my script:
  22. Uia and control functionality should not be mixed as that will not work. Study examples from uia thread or try simplespy that will give some direction.
  23. The version that you are looking for is now called _DebugArrayDisplay.
  24. Hi, I used older version of AutoIt and ArrayDisplay had these buttons of Copy data, copy data and rows/columns number, Exit script. I am on latest version and these buttons are gone. It was very convenient. Is it possible to get it back?
  25. Oh so I'm basically not allowed to get help if it's for a game. Sounds fair enough. Thank you,
  1. Load more activity
  • Create New...