Onitaru
Junior Member
They call me Pope.
Posts: 62
|
Idea
Nov 4, 2005 13:57:20 GMT -5
Post by Onitaru on Nov 4, 2005 13:57:20 GMT -5
Ok I've been browsing the forum for awhile now and it seems to me that an auto-sort could be done I hate sorting crystals when xping I've lost countless coffer keys ; ; one for AF because I forgot to sort.
|
|
|
Idea
Nov 4, 2005 14:00:31 GMT -5
Post by TinyTerror on Nov 4, 2005 14:00:31 GMT -5
yeah, it would just be a matter of simulating a couple of fast keystrokes. This will be a lot easier to do once I add the key press command in the control lib. Right now the only way to do it is by toggling keys, which gets pretty anoying.
|
|
Onitaru
Junior Member
They call me Pope.
Posts: 62
|
Idea
Nov 10, 2005 19:18:01 GMT -5
Post by Onitaru on Nov 10, 2005 19:18:01 GMT -5
Oh seeing as this goes with it kinda how about an auto-dump? just felt I should try here seeing as its being debated by members of the Windower froum.
|
|
|
Idea
Nov 10, 2005 20:37:38 GMT -5
Post by TinyTerror on Nov 10, 2005 20:37:38 GMT -5
Inventory stuff should be possible with the new memory code. You could do the same thing.
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 10, 2005 22:03:14 GMT -5
Post by sdphantom on Nov 10, 2005 22:03:14 GMT -5
Temperarily, you can use this function code in the scripts to do keypresses.
function Control.control_PressKey(keyCode,holdTime) Control.control_SetKey(keyCode,true) if holdTime>0 then Windower.script_Sleep(holdTime) end Control.control_SetKey(keyCode,false) end
<Edit: Fixed the spelling on the first Control.control_SetKey() and put in a condition to not wait if holdTime<=0 (Fixes some possible errors if negative.)>
|
|
|
Idea
Nov 10, 2005 23:59:19 GMT -5
Post by phr33k on Nov 10, 2005 23:59:19 GMT -5
Control.control_SetKey("LCONTROL",true) Windower.script_Sleep(200) Control.control_SetKey("I",true) Windower.script_Sleep(10) Control.control_SetKey("LCONTROL",false) Control.control_SetKey("I",false) Control.control_SetKey("ADD",true) Windower.script_Sleep(10) Control.control_SetKey("ADD",false) Control.control_SetKey("RETURN",true) Windower.script_Sleep(10) Control.control_SetKey("RETURN",false) Control.control_SetKey("UP",true) Windower.script_Sleep(10) Control.control_SetKey("UP",false) Control.control_SetKey("RETURN",true) Windower.script_Sleep(10) Control.control_SetKey("RETURN",false) Control.control_SetKey("ESCAPE",true) Windower.script_Sleep(10) Control.control_SetKey("ESCAPE",false)
This is my auto-sort script. Works very quickly on my cpu , might be too fast for yours , play around with the sleep times if you have a problem
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 11, 2005 1:14:13 GMT -5
Post by sdphantom on Nov 11, 2005 1:14:13 GMT -5
This is my auto-sort script. Works very quickly on my cpu , might be too fast for yours , play around with the sleep times if you have a problem Rewrote to use the Control.control_PressKey() posted above. function Control.control_PressKey(keyCode,holdTime) Control.control_SetKey(keyCode,true) if holdTime>0 then Windower.script_Sleep(holdTime) end Control.control_SetKey(keyCode,false) end
Control.control_SetKey("LCONTROL",true) Control.control_PressKey("I",1) Control.control_SetKey("LCONTROL",false)
Control.control_PressKey("ADD",0) Control.control_PressKey("RETURN",1) Control.control_PressKey("UP",0) Control.control_PressKey("RETURN",1) Control.control_PressKey("ESCAPE",1)
I played with the times and made a few modifications to the function I posted. (Not using sleep if holdTime is 0 or less.) Setting the 10ms to 1ms sleep didn't seem to change the speed, but setting a few keys to 0ms made the script faster on the system I'm working with. (FFXI started missing keys when the others were set to 0.)
|
|
|
Idea
Nov 11, 2005 7:26:03 GMT -5
Post by TinyTerror on Nov 11, 2005 7:26:03 GMT -5
Ahh, found control_PressKey() did we? I need to get off my ass and document that stuff. I guess it seemed sorta counterproductive to update the docs now since there is a TON of new memory stuff comming within a few weeks.
|
|
Onitaru
Junior Member
They call me Pope.
Posts: 62
|
Idea
Nov 11, 2005 19:54:05 GMT -5
Post by Onitaru on Nov 11, 2005 19:54:05 GMT -5
Ok I load it up and it does everything but sort what it will to is go into manual sort pick an item to sort then esc out I tried playing with a bit and ended up crashing pol
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Idea
Nov 12, 2005 1:24:46 GMT -5
Post by petar113507 on Nov 12, 2005 1:24:46 GMT -5
Heh, I came up with my own autoSort script, it's not hard, just I wanna stick that into a Macro. How Can I do that? (I dont remember reading anything about making Macros from the Doc's)
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 12, 2005 18:20:31 GMT -5
Post by sdphantom on Nov 12, 2005 18:20:31 GMT -5
Heh, I came up with my own autoSort script, it's not hard, just I wanna stick that into a Macro. How Can I do that? (I dont remember reading anything about making Macros from the Doc's) After loading Lunar the FFXI macro line would be: /console .Lunar load <scriptName> Replace <scriptName> with the filename of your script.
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 12, 2005 18:25:53 GMT -5
Post by sdphantom on Nov 12, 2005 18:25:53 GMT -5
Ahh, found control_PressKey() did we? Well, not found, but made. I wrote the function that is put in the script. After I posted it, I read in another post that you put the same function in the lib. I'm not sure if I'm overwriting it and doing the exact same thing if it indeed does exist.
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 12, 2005 18:30:45 GMT -5
Post by sdphantom on Nov 12, 2005 18:30:45 GMT -5
Ok I load it up and it does everything but sort what it will to is go into manual sort pick an item to sort then esc out I tried playing with a bit and ended up crashing pol Ya, it may be sending the keystrokes too fast. Try setting the 0's to a higher number to see if it catches the key. As for Lunar crashing POL in that scenario. As Tiny said, there's a few glitches in Lunar freeing up memory and is being worked on. "A programmer's job is never truly done, there's always bugs to fix and features to add."
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Idea
Nov 12, 2005 22:35:40 GMT -5
Post by petar113507 on Nov 12, 2005 22:35:40 GMT -5
Once: /console .Lunar load <scriptName> is written, how would you set it to be in a macro, Or shall I re-word it, once it is a console macro, how would I call upon it? (Not sure, but I mean It to be Trigger the script. How would I trigger it, and how to set the trigger?)
|
|
sdphantom
Full Member
Savior and Destroyer
Posts: 230
|
Idea
Nov 12, 2005 23:25:10 GMT -5
Post by sdphantom on Nov 12, 2005 23:25:10 GMT -5
Once: /console .Lunar load <scriptName> is written, how would you set it to be in a macro, Or shall I re-word it, once it is a console macro, how would I call upon it? (Not sure, but I mean It to be Trigger the script. How would I trigger it, and how to set the trigger?) Just write that as the only line in a FFXI macro. "/console" makes windower intercept it and process ".Lunar load <scriptName>" to tell Lunar to load the script. If you want to set your script on a simple key combination, use the windower command to bind a key in the init script. Example: bind f9 .Lunar load <scriptName> Would bind the F9 key to run the script.
|
|