Jump to content

disc330

Active Members
  • Posts

    26
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

disc330's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. There is much better methods, I recall using NomadMemory.au3 and CheatEngine to use memory addresses. Sadly now I have some privileges issues and cant play around with that anymore. Its really the way to go if you want a quick and effective way of potting.
  2. Perhaps like... IniWrite("File.ini", "Section", "[Key]", "[Value]") Would output: [section] [Key]=[Value]
  3. I'm surprised people still play CO2. It sucks. Here is a script that will help. I put in comments so that hopefully you can learn something from using it. Basicaly, you just open CO then put your mouse over where you want the script to pot. Once you have made up your mind just press the 'HOME' key. Once pressed, if the color of that pixel changes it will press f12. (Note that if you hit alt+tab, it will recognise the pixel as different and mash f12. Probably best to make a while loop with "While WinActive("[Conquer]2.0") " as an expression.) HotKeySet("{HOME}", "_GetHP") Global $Color = 0 Global $Pos[2] Do ; Do nothing until you have chosen a normal color. Until $Color <> 0 ;Color has been chosen While 1 ; loop forever If _HPChanged($Color) Then _Pot() Sleep(20) ;Wait a bit WEnd Func _GetHP() $Pos = MouseGetPos() $Color = PixelGetColor($Pos[0], $Pos[1]) ; Set the normal HP color. EndFunc ;==>_GetHP Func _HPChanged($Color) $NewColor = PixelGetColor($Pos[0], $Pos[1]) ; Get the current HP color. If $NewColor <> $Color Then Return True ; If the current and normal colors are differnt, hp HAS changed. Return False ; There were no changed to the HP EndFunc ;==>_HPChanged Func _Pot() Send("{F12}") ; Press 'f12' or what ever you have pot on. EndFunc ;==>_Pot
  4. Ok, well I tried to just run it by double clicking the icon instead of hitting F5, worked fine. Turns out the whole thing was because of my bad order of Includes. All working now though, and I probably wouldn't have found that tonight if it wasn't for you Richard Robertson so thanks very much.
  5. Exactly what I'm trying to avoid. I'll give it a try for the sake of a breakthrough, but I don't see why I should have to because I never have HAD to before... Thanks for the input anyway and happy Valentines day!
  6. Been using Irrlicht for a while, and I have used the AddCubeSceneNode() & SetPosition() finctions since the begining. They used to work fine, but suddenly today i have started getting an error: CODEERROR: AddCubeSceneNode() called with Const or expression on ByRef-param(s).$TestBoxNode = AddCubeSceneNode(2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ builtin(55,47) : REF: definition of AddCubeSceneNode(). Never heard of this error before, so as a workaround I could just use a variable for every parameter. That was bad enough, but then I got: CODEERROR: SetPosition() called with Const or expression on ByRef-param(s).SetPosition($PlayerNode, GetAbsolutePosition($TestBoxNode , "X"), 0 , GetAbsolutePosition($TestBoxNode , "Z")) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ builtin(56,74) : REF: definition of SetPosition(). I refuse to use variables in SetPosition(). (Note that where the '0' is in SetPosition, I have tried a variable. Its not the number but the functions.) If any other IrrLichters have had this error could you please help me out. Have no idea what it could be other than an include file, but I tried the code without them one by one and i still got it. I am not using any mode of MustDeclareVars and I haven't recieved this error in other scripts. *clueless* =/ Thanks for reading, and super thanks for any help.
  7. What did you do? Works fine for me... Sounds like you just want two GUis that could be completley seperate. Maybe you should read about "Run()" in the helpfile, or just trial and error. Syntax: Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] ) Note that you can only execute files with the folowing extension: EXE, BAT, COM, or PIF
  8. Mmm..yes. I like the way you think. Ill go try it. thanks EDIT: After testing... Without the line: 7.6 Seconds With the line: 7.4 Seconds... o.O Still far from ideal. I dont understand what it is. Would it help to use the: _GUICtrlListView_BeginUpdate($hListView) _GUICtrlListView_EndUpdate($hListView) functions? I will go try that now actually. Thanks for the help though still. EDIT 2: Nope, still taking way to long. probably because its al done in one update anyway. However, I just noticed that if I keep refreshing the rows, the time it takes to fill the data increases... Also the scroll bar shows that the list is suddenly huge and filled with far too much empty space. Solved: I was looking in the wrong place. Dim $aItems[50000][20] <--- it was showing all the rows empty or not.
  9. Well, I got that working. It does indeed support client and server connections in one script. I realise my question was rather advice based than a requirement for help. Sorry about that. Just assumed a few people had been here and already learnt the mistakes for me.
  10. Well, in my opinion it seems a little bit silly to have a login form as the main form, I would only ever have it as a side function or like I did to your script just put it at the top. When you press the button, it would have to use a function, and using he function with a GUI in it means you would have to loop inside the function to get the GUI messages. I always prefer to have the GUI loop running, then the functions are all called from there. But just incase you dont give a damn... =P By the way, I have never used A gui popping up from a button so I actually dont know what im talking about. #Include <Array.au3> #Include <File.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;#include <HTTP.au3> $ver = 0 $Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124) $Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetBkColor(0xffffff) ; biale tlo $Input_login = GUICtrlCreateInput("", 96, 112, 169, 21) $Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21) $Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17) $Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17) $Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0) GUISetState(@SW_SHOW) While 1 $aMsg = GUIGetMsg(1) Select Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx GUIDelete($Formx) Exit case $aMsg[0] = $Buttonx Sleep(2000) GUIDelete($Formx) _ShowMainForm() endselect wend Func _ShowMainForm() $Form0 = GUICreate("Fotka Vote " & $ver, 372, 170, 294, 373) $logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button_start = GUICtrlCreateButton("Start", 224, 136, 137, 33) $Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0) $Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0) GUISetBkColor(0xffffff) ; biale tlo GUISetState(@SW_SHOW) EndFunc You may realise that now the GUI message isnt regestering because "And $aMsg[1] = $Formx" isnt true. (Its not coming from $Formx, its coming from $Form0)
  11. The helpfile is amazing for when your starting off, it will get you very far. I would advise first looking up some things for the macro, this is made particularly easy in autoit because you can use functions such as: MouseGetPos() <--- Gives the position of the mouse PixelGetColor() <--- Gives you the colour of the pixel under the given coordinates MouseClick() <-- Great easy to use function to click on the screen ControlClick() <-- All the ability of MouseClick, but its possible to click into background windows. Send() <-- Simulate keystroks (Type) ControlSend() <-- Type to a background window You will also want to look into hotkeys because if you use these functions and need to exit quickly, you wont have control over the mouse if you use MouseClick... So: HotkeySet <--- A must have
  12. As Brett pointed out, your exit was all wrong. Also, I dont know if it was intended, but your not meant to have code on the same line as your functions first line. Func _exit () ; Put nothing on this line after the brackets are closed. IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir1", GUICtrlRead($s)) IniWrite(@SystemDir & "ImageConverter.ini", "Settings", "Dir2", GUICtrlRead($d)) Exit EndFunc Thats all the problems findable in the given code, but as Melba23 said, your Au3Check is a lot more descrptive than just saying "Syntax Error". Read it fully and go over your code to see if you can find any more problems, double clicking the error will take you right to the line, it even shows you the character where the problem has been found... =P
  13. The helpfile really goes a long way on this one... To end the script you always use it as a hotkey: HotKeySet("{TAB}","_Terminate"); Put this at the top of your script Func _Terminate() ; Then this function somewhere near the bottom Exit EndFuncoÝ÷ ØÚ0§ʩ­ë,¶­i¶î¶Ú'Ü"W[ay7«)ÚµçîËb¢v§vØ^Lb¶Ø^±Êâ¦ÓhµëajÜ!z|¨¹«, í+!¢ÙË*.ÂímæëhºÇ­ëZnG²æjYrÂ¥zØ^±Êâ¦Ø¬®éçx¢éÚ²È Ø^d{(î²Û¬zØb±«­¢+Ù!½Ñ-åMÐ ÅÕ½ÐííQ ôÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤ì ±°¹¼Õ¹Ñ¥½¸Ý¡¸Ñ¡¡½Ñ­ä¥ÌÁÉÍÍ EDIT: Whoops, codebox
  14. I quickly did this... it works, but it could probably do with some personalizing: #Include <Array.au3> #Include <File.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;#include <HTTP.au3> $ver = 0 $Formx = GUICreate("Fotka Vote v.0.0.1 beta", 379, 181, 192, 124) $Pic1 = GUICtrlCreatePic("logo1.bmp", 24, 8, 333, 84, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetBkColor(0xffffff) ; biale tlo $Input_login = GUICtrlCreateInput("", 96, 112, 169, 21) $Input_haslo = GUICtrlCreateInput("", 96, 144, 169, 21) $Labelx1 = GUICtrlCreateLabel("Login:", 32, 112, 52, 17) $Labelx2 = GUICtrlCreateLabel("Haslo:", 32, 144, 52, 17) $Buttonx = GUICtrlCreateButton("Zaloguj", 288, 136, 81, 33, 0) GUISetState(@SW_SHOW) $LoggedIn = false do $aMsg = GUIGetMsg(1) Select Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Formx GUIDelete($Formx) Exit case $aMsg[0] = $Buttonx Sleep(2000) GUIDelete($Formx) $LoggedIn = True endselect Until $LoggedIn $Form0 = GUICreate("Fotka Vote " & $ver, 372, 170, 294, 373) $logo = GUICtrlCreatePic("C:\D & S\Prezes\Pulpit\www\AutoIT\Fotka projekt\logo1.bmp", 16, 8, 337, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button_start = GUICtrlCreateButton("Start", 224, 136, 137, 33) $Button_about = GUICtrlCreateButton("About", 8, 120, 57, 33, 0) $Button_info = GUICtrlCreateButton("Info", 80, 120, 57, 33, 0) GUISetBkColor(0xffffff) ; biale tlo GUISetState(@SW_SHOW) While 1 $aMsg = GUIGetMsg(1) Select Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $Form0 GUIDelete($Form0) Exit endselect WEnd (Note that I commented out you HTTP.au3 include and I also declared $ver to get it working, you may need to change that back.)
  15. I'm using _GUICtrlListView_AddArray() along with an SQL query to read records and put them into a list but its taking way too long. I'm currently only using 3 records, and its taking about 7 seconds to just perform the _GUICtrlListView_AddArray() function. If anyone knows a faster way, or knows what im doing wrong here please do tell. ( I assume I am doing something VERY wrong because the helpfile example takes just over a second to display 5000 records with 4 columns...) Code: While _SQLite_FetchData ($hQuery, $aRows) = $SQLITE_OK $RowColCount = StringSplit(_ArrayToString($aRows,"|"),"|") For $ii = 0 to $RowColCount[0]-1 $aItems[$i][$ii] = $aRows[$ii] Next $i += 1 WEnd $timer = TimerInit() _GUICtrlListView_AddArray($LTV_SQLTableData,$aItems) MsgBox(0,"",TimerDiff($timer) )
×
×
  • Create New...