Jump to content

Info

Active Members
  • Posts

    733
  • Joined

  • Last visited

Everything posted by Info

  1. Hi all, I'm a member of a private facebook group (it has 100k members, but still private), and I want to automatically scan every new post in this group. My first thought was to use Facebook's Graph API but turns out it's really limiting in terms of permissions (it requires the group admin to install my app), so I can't use it. My next idea is to use AutoIt's _IE api and basically refresh the group's web page every couple of seconds, then request the source code of the resulting page and scan it. This approach is way more technical and annoying to code but it's the best one I can think of. Has anyone ever done something like this? Is there a better approach I'm not aware of? (doesn't necessarily has to be an AutoIt solution) thanks
  2. Global $array[3][10] f($array[0]) Func f($a) MsgBox(0,"",UBound($a)) EndFunc I want to access the first column of $array inside f(). The desired MsgBox message is 10, as there are 10 rows in the first column. (Or is it the opposite? I'm not sure ) There script, however, returns an error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.: f($array[0]) f(^ ERROR
  3. I installed Sandboxie which is a nice tool but the context menu item (I think it's called that) it creates for every file in my Windows 7 is pretty annoying. I'm talking about the "Run Sandboxed" option. Does anyone know where I can edit or delete this entry? Is it stored in the registry?
  4. I'm trying to implement my own _GUICtrlEdit_Find() function. Is there a function that searches for a given text in the edit control and returns the starting character position of the given text? Edit: Stupid me.. I can retrieve the text and then call stringinstr()...
  5. Thanks Melba I actually remember you helping me a few years ago as well
  6. In my script, I'm dealing with long text strings that don't contain spaces. The current settings for a label control is to do a line break when the text is long and it identifies a space character. My question is if it's possible to make it do a line break when the label text reaches its borders, regardless of a space char. Here's an example #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("", 615, 438, 192, 124) $Label1 = GUICtrlCreateLabel("longgggggggggggggggggggggGgGgGgggggggggggg", 160, 112, 80, 34) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I want the text to drop down one line when 80 pixels of text are reached.
  7. He just explained the joke don't be an asshole
  8. Please do tell
  9. But what if the server and the client are supposed to receive and send information in such short delays? (video games softwares, etc...)Also, I did what you said in the TCP code and it still receives wrong strings.
  10. I noticed that when "spamming" data to the server via TCP (no delay between each send function), the server gets the data all wrong. (this didn't only happen to me in AutoIt) So I tried doing the same thing with a UDP connection and the data came out fine. Here's 2 examples of server-client scripts that spam an "abc" string to the server, which then displays the string in a tooltip. TCP server TCP client UDP server UDP client Result in the TCP server: Result in the UDP server: Isn't it supposed to be the other way around? Why do I get "secured" data in the UDP connection and wrong data in the TCP connection?
  11. you could correct me if you knew the library I was talking about. Thanks ProgAndy
  12. That's not true. From the libraries I've been using lately, you can't loop many functions like glEnable and glLight*(). (well you can, it just won't be efficient)These functions just need to appear one by one in the source code. Correct me if I'm wrong. cool, didn't know that
  13. Is there a keybind for Microsoft's Visual Studio (Express version if it matters) that copies the selected line in the text editor and pastes it in the next new line, just like the ctrl-d keybind in scite?
  14. No idea what "ModuleSpy" is but for injecting a dll. Also Are you sure you want to use AutoIt for that?
  15. So moving the mouse speeds things up? :S
  16. Hehe nvm, got it to work. bool tcp_server::GetSocketIP(const SOCKET &socket, char *sBuffer)//might only work for ipv4, don't know why { sockaddr sa; ZeroMemory(&sa, sizeof sa); int iLen = sizeof sa; if( getpeername(socket, &sa, &iLen) != 0 ) return false; strcpy(sBuffer, inet_ntoa(reinterpret_cast<sockaddr_in*>(&sa)->sin_addr)); return true; }
  17. Func _SocketGetIP($Data) Local $Struct, $Return $Struct = DllStructCreate('short;ushort;uint;char[8]') $Return = DllCall('Ws2_32.dll', 'int', 'getpeername', 'int', $Data, 'ptr', DllStructGetPtr($Struct), 'int*', DllStructGetSize($Struct)) If @error Or $Return[0] <> 0 Then Return 0 $Return = DllCall('Ws2_32.dll', 'str', 'inet_ntoa', 'int', DllStructGetData($Struct, 3)) If @error Then Return 0 $Struct = 0 Return $Return[0] EndFunc ;==>_SocketGetIP Here's my attempt bool GetSocketIP(const SOCKET &socket, char *sBuffer) { sockaddr sa; ZeroMemory(&sa, sizeof sa); int iLen = sizeof sa; if( getpeername(socket, &sa, &iLen) != 0 ) return false; strcpy(sBuffer, inet_ntoa(reinterpret_cast<sockaddr_in*>(&sa)->sin_addr)); return true; } Thanks Edit: Forgot to say, the C++ functions isn't really like the AutoIt one because of the return values and the parameters and stuff, but you get the idea.
  18. Okay thanks
  19. What do you mean?
  20. So MB_ICONQUESTION has no sound
  21. Does the MessageBox function from the WinAPI has a built-in sound-making function or does the C++ source of AutoIt include some kind of function like PlaySound after MsgBox has been called? I'm asking this because I just used MessageBox and I heard no sound. The flags I used are MB_ICONQUESTION | MB_YESNO.
  22. I see. Anyway, I give up on this. I should have chose C++ for this project but it's too late now. Thanks
  23. Thank you but this still does not solve the whole issue. Although the Listview is not getting stuck anymore, it still waits until a menu item's event function finishes executing before it allows other menu items' functions to execute.
×
×
  • Create New...