Jump to content

livewire

Active Members
  • Posts

    202
  • Joined

  • Last visited

About livewire

  • Birthday 04/15/1982

Profile Information

  • Location
    Orlando, FL

livewire's Achievements

Polymath

Polymath (5/7)

2

Reputation

  1. Looks like the feature request was denied. Anyone know why this functionality was removed? It used to function how I mentioned. I don't know which version removed this functionality, but you can test it by running the code in my first post using AutoIt v3.2.0.0. This is an old post where I explained to someone how it worked: http://www.autoitscript.com/forum/index.ph...6432&hl=udp -Livewire
  2. Yes, I have tried the code with AutoIt v3.2.0.0. It used to work and now it doesn't with the current version of AutoIt. You can try it with an old version and see: http://www.autoitscript.com/autoit3/files/archive/autoit/ -Malachi
  3. I would like the code to automatically figure out where the server is (what IP it is). UDPRecv (called in the server) used to obtain the client's IP in the third index of the returned array. The point of this example is: If you have a server running and an arbitrary client sends data to it, how do you send data back to that client? Note: The exact code that I posted used to work as I mentioned in v3.2.0.0. Was the functionality changed for any good reason? Or is it a bug? -Malachi
  4. Any idea why this isn't working? It used to work how I wanted it to on AutoIt v3.2.0.0. The client program should send messages to the server and receive back acknowledgments. It appears that in the current version (3.3.0.0), the server sends to itself with this code. Any clues? Note: You have to change the IPs to reflect your computer addresses. Server: UDPStartup() $socket = UDPBind("192.168.1.114", 20000) If @error <> 0 Then Exit While 1 $data = UDPRecv($socket,500) If $data <> "" Then MsgBox(0, "UDP DATA", $data,1) $recv_socket = UDPOpen($socket[2], 20000) If @error <> 0 Then Exit $status = UDPSend($recv_socket, "Ack") UDPCloseSocket($recv_socket) EndIf sleep(50) WEnd Func OnAutoItExit() UDPCloseSocket($socket) UDPShutdown() EndFunc -Livewire
  5. I believe that the current beta (v3.2.13.6) has problems with RunAs. Is anyone else experiencing these problems? This code works in the official release (creates the cmd.exe process and you can visually see the console). Using the beta, it creates the process and you can't see the console. ; Fill in the username and password appropriate for your system. Local $sUserName = "someUser" Local $sPassword = "somePass" ; Run a command prompt as the other user. RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir)oÝ÷ Ù8b±Êy©pk++zÛ«Í×hzÉ÷ö×+y«^¶·£k¡Ç¬²ë"ay·­j»§)àÖòvç%É"ay«·~)^Féçx-êk¢ ÚØk¢è!IÈ +Çâå,x-ê~'"jZÞæ¬z+p¢¹,jw­æ­zËazèqë,o*îx§+n²)à¶»wâê+o+¬xr$Äjëh×6MsgBox(0,"Testing",RunAs("someUser",@ComputerName,"somePass",1,"C:\Program Files\Mozilla Firefox\firefox.exe","C:\Program Files\Mozilla Firefox")) -Livewire
  6. I found an old post where someone else ran into this problem...see here...any suggestions. Thanks, Livewire
  7. @ptrex, I know that AU3 cannot build ActiveX controls. In this post, I'm saying that AU3 cannot use the C++ ActiveX control mentioned in the ActiveX tutorial link in the first post. -Livewire
  8. Does anyone know how to get this ActiveX control to work with AutoIt? I can get the control to display in AutoIt's GUI but cannot access its methods or properties. ActiveX source can be downloaded here (click the 'Download demo project' at the bottom): http://www.codeguru.com/cpp/com-tech/activ...icle.php/c5517/ I also had to comment out the following line in the function (void CPlotCtrl::OnDraw) in file (PlotCtl.cpp) to get the sin graph to display correctly (for some reason): pdc->FillRect (m_DrawRect,&hbrBackground); // <---- I had to comment out this line This control works perfectly unmodified in VB6 (no need to comment out the line and methods and properties work fine)...what's the deal? -Livewire
  9. Replace DllCall("UnRarAutoItWrapper.dll","none","ExtractArchive","str",$filename,"int",0,"str","") With DllCall("UnRarAutoItWrapper.dll","none","ExtractArchive","str",$filename,"str","") -Livewire
  10. Try this dll...see AutoIt file for usage. Note: Requires unrar.dll // UnRarAutoitWrapper2005.cpp : Defines the entry point for the DLL application. // #define STRICT #include "stdafx.h" #include <windows.h> #include <stdio.h> #include <ctype.h> #include "unrar.h" void _stdcall ExtractArchive(char *ArcName,char *Password); BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE; } void _stdcall ExtractArchive(char *ArcName,char *Password) { HANDLE hArcData; int RHCode,PFCode; char CmtBuf[16384]; struct RARHeaderData HeaderData; struct RAROpenArchiveDataEx OpenArchiveData; memset(&OpenArchiveData,0,sizeof(OpenArchiveData)); OpenArchiveData.ArcName=ArcName; OpenArchiveData.CmtBuf=CmtBuf; OpenArchiveData.CmtBufSize=sizeof(CmtBuf); OpenArchiveData.OpenMode=RAR_OM_EXTRACT; hArcData=RAROpenArchiveEx(&OpenArchiveData); if(strlen(Password)) RARSetPassword(hArcData,Password); if (OpenArchiveData.OpenResult!=0) { return; } HeaderData.CmtBuf=NULL; while ((RHCode=RARReadHeader(hArcData,&HeaderData))==0) { PFCode=RARProcessFile(hArcData,RAR_EXTRACT,NULL,NULL); if (PFCode==0) { //printf(" Ok"); } else { break; } } RARCloseArchive(hArcData); }UnRarAutoitWrapper.zip
  11. Works for me...as long as you don't use UPX when you compile.
  12. Jon, ProcessGetStats points to ProcessExists in the helpfile for the v3.2.9.2 (beta). -Livewire
  13. Running this script and clicking the button twice continuouly fires button click events. Tried with Autoit3 versions 3.2.8.1 and 3.2.9.0 Windows XP SP2 #include <GUIConstants.au3> Global $count = 0 GUICreate("My GUI Button") $Button_1 = GUICtrlCreateButton("Click", 10, 20, 150) $Input_1 = GUICtrlCreateInput("", 10,50, 150) GUISetState() ; will display an dialog box with 2 button While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 $count += 1 GUICtrlSetData($Input_1,"Button clicks: " & $count) GUICtrlSetBkColor($Button_1,0x00FF00) EndSelect Wend -Livewire
  14. Sounds good...will try to do that. Microsoft Visual C++ 6.0, but should be able to get it to compile using 2005 or devC++. -Livewire
  15. I found this code on codeproject and changed it to work with AutoIt. 1. I haven't used the memory udfs. But in the quick glance that I looked at it, I'm sure you could do the same. Sorry, I can't answer those complicated memory questions. I was hoping someone could just change the code if it's possible to: not use swap, not use dll, etc.
×
×
  • Create New...