Jump to content

Slythfox

Active Members
  • Posts

    67
  • Joined

  • Last visited

Slythfox's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. Thanks, that worked! I didn't realize I needed to do that.
  2. I've been looking at those and haven't found anything that leads me to anything. Is it really that hard to request (but not download) a page on a web server, without the use of the IE libraries?
  3. That's how stuff works. For example, in IRC you use stuff like PRIVMSG NickServ :IDENTIFY I did some packet sniffing, but I can't seem to get this HTTP TCP stuff to work.
  4. I want to avoid using IE to make a http server request. I have a working apache server, and have set up a php script called write.php that will write to a file if it is accessed. I know this isn't working because the file hasn't been written to (the write.php file has been tested). #include <GUIConstants.au3> TCPStartUp() Dim $ConnectedSocket = -1 $ConnectedSocket = TCPConnect("192.168.0.6",80) Dim $szData If @error Then MsgBox(4112,"Error","TCPConnect failed with WSA error: " & @error) Else TCPSend($ConnectedSocket,"GET /write.php HTTP/1.1\r\nHost: 192.168.0.6\r\n\r\n") EndIf What am I doing wrong?
  5. Yeah, I've been searching around for awhile. I just found this. For the context of my program, there may be a situation in which there are two instances of the title "xyz" but each with a different process name, which can create problem when using winsetstate. I need to be able to change the winsetstate of one of those processes, but not the other.
  6. I was wondering if anyone had any ideas on how to use WinSetState, but set the state of a program by the process (.exe) rather than by the title.
  7. I've done that too. Doesn't work. I got this to work: RunWait(@ScriptDir & "/bin/php/php.exe base64_encode.php", @ScriptDir & "/bin/php/") Thanks a bunch! I was always confused what that second attribute did. EDIT: Wait, How do I get the window to hide. It almost seems as if the php script doesn't run when I add " ,@SW_HIDE" EDIT2: NVM, I think it's just GUI lag. (The PHP script outputs a lot!)
  8. Okay, so I have this: RunWait(@ScriptDir & "/bin/php/php.exe script.php") It displays a window real quickly (not enough time to read it). If I put php.exe, script.php, etc in the same directory as the autoit script, the script works (exact code above). I've tried creating a script in a bat to run the command which doesn't work in autoit. I've also tried _RunDos() and ShellExecute(), both of which have the same issue. I don't want to have php.exe and everything in the main directory, as it is disorganized for the programmer, and confusing for the user. How is this fixable?
  9. It seems that putting a pic in the GUI with GUICtrlCreatePic makes buttons and such unusable. Any ideas on how to fix this? Edit: Sorry, posted in wrong topic/forum. These forums keep changing everytime I visit. Edit 2: Nvm, finally found the solution here: http://www.autoitscript.com/forum/index.ph...rt=#entry339857
  10. I kinda new to dll calling, too. Might telling me what your code looks like for calling freeimage functions? (There doesn't seem to be any simple freeimage autoit UDFs around)
  11. Looks like the first post was edited on Jan 25 2007... are we to assume this project is still in the works?
  12. I have a PS2 (as in playstation2) controller attached to my computer, via USB. I also have a file containing the hex values for all the buttons. What I need is a script that tells me if one of these buttons is being pressed. I've been searching the forums, trying out bits of codes I find, and attempting to modify it so that it works with my controller, but apparently not. I was wondering if any of you could help me out. I've managed to confuse myself on how to use _IsPressed. Here's an image of the file with the hex values, in a hex editor... My guess is that each button takes up four of those blocks. EDIT: Posted this in the wrong support forum... Looks like things have been rearranged since I was last here. So mods, feel free to yell and scream at me for my mistake.
  13. Works, except the following line: If Not StringRegExp($command[$number] , ">([^<> .:ascii:]*?)<" , 0) ThenI had to change to: If Not StringRegExp($command[$number] , "([^<> .:ascii:]*?)<" , 0) ThenStill gives me blank errors though (I changed the ConsoleWrite() to a traytip(), and it displays empty errors, but it still works). Script no longer disconnects when the disconnecting command is sent, and it still quits randomly after awhile (I've tried people's suggestions for debugging this, as well as my own, and I've gotten no where.) It works much faster now. I think the main lagger this time is the Lua script, because it's sending packets with too many commands, and when the autoit script receives them, especially big ones, it will execute them all at once really fast, the way it should work. (So I need to figure out how to send smaller packets in Lua.) BTW, the latest source code for everything can be found here: http://www.quate.net/link.php?pspmote
  14. I had changed the third param of mousemove to 0. I admit, I made an assumption that the lua script was sending more commands per second. However, my evidence that the tcp in the autoit script is slower is that the autoit script will often execute two commands per receive. (I move the analog stick on PSP, autoit processes it as two actions, or press a button, and it gets sent several times... (lua parsing is quite fast)) I used the sniffer, and it was sniffing at least 6 commands per second, often times more. Interestingly, the autoit script hasn't quit randomly recently... But I do notice that the autoit script will pause for a second, before continuing parsing the tcp commands, which I suspect has to do with the tcp buffer size.
  15. 4096 Honestly, however, I saw little or no difference speed-wise when I changed the number from 128 to 2048 to 4096. I guess the weakest link could be the sender, which is a lua script rather than an autoit script. However, the lua script executes extremely fast... I'm pretty sure it's not the weakest link. Lastly, it could be possible that my network is the weakest link: the computers are communicating wirelessly (wireless to wireless hub to ethernet). But I don't see how a 54mbit/sec connection would send only 3 strings a second (3 strings that are a max of 88mbits (11bytes)...) For anyone who is suspicious of the lua script: System.usbDiskModeActivate() white = Color.new(255, 255, 255) offscreen = Image.createEmpty(480, 272) offscreen:clear(Color.new(0, 0, 0)) y = 0 x = 0 function graphicsPrint(text) for i = 1, string.len(text) do char = string.sub(text, i, i) if char == "\n" then y = y + 8 x = 0 elseif char ~= "\r" then offscreen:print(x, y, char, white) x = x + 8 end end screen:blit(0, 0, offscreen) screen.waitVblankStart() screen.flip() end function graphicsPrintln(text) graphicsPrint(text .. "\n") end -- init WLAN and choose connection config Wlan.init() configs = Wlan.getConnectionConfigs() --graphicsPrintln("Available connections:") --graphicsPrintln("") --for key, value in ipairs(configs) do -- graphicsPrintln(key .. ": " .. value) --end --graphicsPrintln("") graphicsPrintln("Using first connection.") Wlan.useConnectionConfig(1) -- start server socket graphicsPrintln("Open server socket.") serverSocket = Socket.createServerSocket(80) -- start connection and wait until it is connected graphicsPrintln("Determining IP address.") while true do ipAddress = Wlan.getIPAddress() if ipAddress then break end System.sleep(100) end graphicsPrintln("") continueProgram = true graphicsPrintln("Connecting to 192.168.0.11...") socket, error = Socket.connect("192.168.0.11", 31221) while not socket:isConnected() do System.sleep(100) pad = Controls.read() if pad:start() then continueProgram = false break end end if continueProgram == false then -- will not display anymore. else graphicsPrintln("Connected to " .. tostring(socket)) -- read and display result while true do pad = Controls.read() if pad:analogX() > 30 or pad:analogX() < -30 or pad:analogY() > 30 or pad:analogY() < -30 then socket:send("m|" .. (pad:analogX()/2) .. "|" .. (pad:analogY()/2)) end if pad:up() then socket:send("m|0|-8") end if pad:down() then socket:send("m|0|8") end if pad:left() then socket:send("m|-8|0") end if pad:right() then socket:send("m|8|0") end if pad:cross() then socket:send("c|left|1") end if pad:square() then socket:send("c|left|2") end if pad:circle() then socket:send("c|right|1") end if pad:r() then socket:send("s|!{ESC}|1") end if pad:l() then socket:send("s|!+{TAB}|1") end if pad:triangle() then socket:send("d|1|1") graphicsPrintln("Disconnected.") socket:close() end if pad:start() then socket:send("d|1|1") graphicsPrintln("Disconnected.") graphicsPrintln("Quit.") socket:close() break end screen.waitVblankStart() end end Wlan.term()
×
×
  • Create New...