Jump to content

Delta01

Active Members
  • Posts

    160
  • Joined

  • Last visited

Everything posted by Delta01

  1. Hey. Is it possible to convert a .tga image file into a .jpg or .png, my script doesn't save the file but I want to use it in a GUI and I can't use a .tga file.. I need the script to convert it because another program creates them during the running of my script. Thanks
  2. Still won't work. I get an array error @ $Height = $aDim[2] Then if I do Dim $aDim[3] I don't get the error but the message box remains blank.
  3. GEOSoft, that code doesn't work. #include <Filex.au3> $iDim = _File_Ext_PropertiesGet(@DesktopDir & "\test.jpg", "dimensions") If NOT @Error Then $aDim = StringSplit(StringStripWS($iDim, 8), "x") If IsArray($aDim) Then $Width = $aDim[1] $Height = $aDim[2] EndIf Else MsgBox(0, "Error", $iDim) EndIf MsgBox(64, "Hmm", $Width & @CR & $Height)
  4. You referred to me as "stupid" before, at least I can speak good English. "but i want to reply and you are no one to told me not to do that" I don't care about you, your views, beliefs or opinion. Just stfu and leave this thread. Bump
  5. Damn. Are you tell me you can't read as well?
  6. Wow, hit me where it hurts. My autoit knowledge. Bump, looking for a reply from a non-egotistic moron
  7. Thanks, works now
  8. Wtf? Take the pole out of your ass for a second. I came here asking for help because yes, I don't know how to use FTPCommand() and instead of being nice and helping you're getting off to that pole. If you won't help me, don't post. The number of posts you have has no correlation to your penis size. You've been no help at all. You've just told me what I already know. I want to know how to use FTPCommand() - THAT'S IT
  9. Can someone tell me why the below code doesn't work, please. #include <Constants.au3> MsgBox(64, "Returned", _CheckProcessConnect("firefox.exe") & @CR & @ERROR) ;=============================================================================== ; ; Description: Checks if a process is connected - to the internet / to a specific IP ; Syntax: _CheckProcessConnect($sProcess,$iIp = False) ; Parameter(s): $sProcess = Processname / Process ID to look for ; $iIp = The IP that the Process should be connected to [ optional! ] ; Requirement(s): None ; Return Value(s): On Success - Returns 1 ; On Failure - Returns 0 and sets @error ; 1 = No connection exists ; 2 = Process does not exist ; 3 = No german Windows ; Author(s): qon ; Note(s): None ; ;=============================================================================== Func _CheckProcessConnect($sProcess,$iIp = False) $iPID = ProcessExists($sProcess) If $iPID = 0 then SetError(2) Return 0 EndIf $foo = Run(@ComSpec & " /c netstat -on", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $line = StdoutRead($foo) If @error Then ExitLoop Switch $iIp Case False If StringInStr(" " & $line & " ",$iPID) and StringInStr(" " & $line & " ","HERGESTELLT") Then Return 1 EndIf Case Else If StringInStr(" " & $line & " ",$iPID) and StringInStr(" " & $line & " ","HERGESTELLT") and StringInStr(" " & $line & " ",$iIp) Then Return 1 EndIf EndSwitch Wend SetError(1) Return 0 EndFunc If there is a connection to the internet, it should return 1
  10. I'm not stupid. I have that. I have FTP.au3 (the bigger one) What i want to know is: Is there a command to APPEND to a file. Not PUT a file on the server, EDIT it.
  11. I don't know how to use FTPCommand. I don't know what command to put in there, hence why there is no code. ATM I am doing that. Creating the file on my pc, deleting from server then uploading. But this is slow and would be easier if I could just append the file
  12. I want to write to a .txt file that's on my FTP server. At the moment I have to delete it then put it back, which takes awhile. So... Is there anyway I can use FTPCommand() to write to a file (preferably just one line it's okay if it deletes everything tho) Here is FTP Command #cs=============================================================================== Function Name: _FTPCommand() Description: Sends a command to an FTP server. Parameter(s): $l_FTPSession - The Long from _FTPOpen() $s_FTPCommand - Commad string to send to FTP Server $l_ExpectResponse - Data socket for response in Async mode $s_Context - A pointer to a variable that contains an application-defined value used to identify the application context in callback operations $s_Handle - A pointer to a handle that is created if a valid data socket is opened. The $s_ExpectResponse parameter must be set to TRUE for phFtpCommand to be filled. Requirement(s): DllCall, wininet.dll Return Value(s): On Success - Returns an indentifier. On Failure - 0 and sets @ERROR Author(s): Bill Mezian Command Examples: depends on server syntax. The following is for Binary transfer, ASCII transfer, Passive transfer mode (used with firewalls) 'type I' 'type A' 'pasv' #ce=============================================================================== Edit: I don't really care if it uses FTPCommand() I just want to be able to do it.
  13. As the title says, I've found some javascript that can upload to imageshack w/o the need for a browser. The code is below and I want to know if/how I can put it in a script. <form method="post" action="http://www.imageshack.us/" enctype="multipart/form-data" onsubmit="return checkemail()" id="upform"> <script type="text/javascript" src="/scripts/common/magicbutton.js"></script> <table cellspacing="0" cellpadding="0" border="0" style="width:100%"> <tr> <td colspan="3" nowrap="NOWRAP"> <div id="upfile"> <input type="file" name="fileupload" size="50" style="height:20px;" onchange="showoptions(this)" id="fileupload"/> </div> <div id="upurl" style="display: none"><input type="text" id="fileupload" value="paste image url here" style="color: #888;height:20px" onfocus="focusfield(this)" name="url" size="50"> </div> <div id="upvideo" style="display: none"> <input type="text" value="" disabled="DISABLED" size="50" style="height:20px"/>&nbsp;<script type="text/javascript">_magic_button('height:20px;width:70px;background-color:#cccccc;')</script> </div> <div id="upflash" style="display: none"> </div> </td> </tr> </table> <input type="hidden" name="MAX_FILE_SIZE" value="13145728"> <input type="hidden" name="refer" value=""> <input type="hidden" name="brand" value=""> <input id="butan" style="width:135px;border:2px solid #FF6600" type="submit" value="host it!" /> <input id="swfbutan" style="width:135px;display:none;border:2px solid #FF6600" type="button" value="start upload!" onclick="uploadstart()"/> </form> Thanks
  14. Bump.......
  15. Because it has the other code I need like, FTPOPen()
  16. Huh? Did you change anything?
  17. Well, I'm trying to download a file from my FTP server. I get the file downloaded, but then the script says "AutoIt has stopped responding" How can I fix this, my code is below... #Include <_FTP.au3> $server = 'server.host.com' $username = 'username' $pass = 'password' $dllhandle = DllOpen('wininet.dll') $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) _FTPGetFile($Conn,"/hello.txt", @ScriptDir & "/hello.txt", 0, 0) $Ftpc = _FTPClose($Open) DllClose($dllhandle) ;=============================================================================== ; ; Function Name: _FTPGetFile() ; Description: Get file from a FTP server. ; Parameter(s): $l_FTPSession - The Long from _FTPConnect() ; $s_LocalFile - The local file. ; $s_RemoteFile - The remote Location for the file. ; $l_Flags - Special flags. ; $l_Context - I dont got a clue what this does. ; Requirement(s): DllCall, wininet.dll ; Return Value(s): On Success - 1 ; On Failure - 0 ; Author(s): Wouter van Kesteren ; ;=============================================================================== Func _FTPGetFile($l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0) Local $ai_FTPGetFile = DllCall('wininet.dll', 'int', 'FtpGetFile', 'long', $l_FTPSession, 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context) If @error OR $ai_FTPGetFile[0] = 0 Then SetError(-1) Return 0 EndIf Return $ai_FTPGetFile[0] EndFunc What am I doing wrong?
  18. Well, dam. If I'm going to need to forward a port on each computer then there's not much point. Is there any way I can upload a .txt file to a server without opening any windows or anything? Because ten I could use INetGet() and just read the text file
  19. Ahh, thanks. What would I forward a port to? If my application was called, say: Delta01.exe would I forward the port it sends on and the local IP with that application name?
  20. Is TCP only used for computers on the same network? I need to send data from one computer to another, that aren't connected locally. All the scripts I've found have been for sending locally and using @IpAddress1 to send on and to receive on. I ask because I want to create an app that sends data to another computer, when it receives a certain command. Can someone show me a short example of sending to a computer, say in a different country. Assume the IP is: 111.111.111.111 that way it should be easy for me to understand. Thanks
  21. What do we forward the port to? What app?
×
×
  • Create New...