Jump to content

Starky

Active Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Starky

  1. #include <GuiListView.au3> _GUICtrlListView_MapIndexToID ( $hWnd, $iIndex ) I know the post is old, but seeming as it was within the top 3 results on Google when I looked into this, I felt this needs to be in here.
  2. This may be the wrong direction I am taking but I don't know of anything else to try. I would like to basically run an application (.exe) from PHP and have the window of the application display on the web server itself. When I use a run command from PHP, it runs the application as the inet guest user and I cannot view that application from the server. What I have tried to do is make an AutoIt script to run that application as the user the web server is currently logged onto so I can view that application from the server. But I keep getting an error (displayed on the server): "The application failed to initialize properly (0xc0000142). Click OK to terminate the application". From the task manager I can see that the application is running from the correct user, I just cannot get passed this error. Is what I am trying to do possible with the RunAsSet command, or do I need to look elsewhere?
  3. Oops, didn't see that in the change log. Thanks for pointing that out. I don't see why it is still in the docs though.
  4. I appear to be having a problem getting URLDownloadToFile to work. It keeps saying "Method or data member not found" and I don't know why. All the other AutoItX functions seem to work, but this one. Any ideas? Dim AutoItX3 As New AutoItX3Lib.AutoItX3 Private Sub UserControl_Initialize() Dim intDL As Integer intDL = AutoItX3.URLDownloadToFile("http://www.google.com", "C:\downloaded.htm") End Sub
  5. Eh... No need really since there is a tray icon you can terminate with.
  6. And... This script is quite pointless. You can just hold down the key in game you get the same effect.
  7. Do you have F11 bound to a key in game? If so, have you tried changing your hot key to something that bf2 does not use? Also, your script is longer than it needs to be. You only need one variable. Global $sendKey HotKeySet("{F11}", "spamtehbutton") While 1 Sleep(100) WEnd Func spamtehbutton() $sendKey = NOT $sendKey While $sendKey Send("e") WEnd EndFunc
  8. Thank you for your spiteful response, but even if it is something as simple as this, I am just trying to gather ideas from other people so I can figure out what is doable and what isn't.
  9. Is there a way to do it with both images showing at all times? Also, the control ID comes first, then the state, but thanks for the idea.
  10. Thanks for your reply, but is there a way to do it after the images have already been created?
  11. Let's say I have... $picA = GUICtrlCreatePic("imageA.gif", 100, 100) $picB = GUICtrlCreatePic("imageB.gif", 110, 110) By default, picture B is above picture A because it was created last. Is there a way to bring picture A above picture B without creating it after B?
  12. Actually.. Here is one way, if you resize smaller than what the window is, it will snap back to default... I prefer to have it stop while resizing. I am going to mess around with it some more. I took the GUICtrlSetResizing() help file and edited it a little to show. Also, I used $GUI_EVENT_MOUSEMOVE instead of $GUI_EVENT_RESIZED because it has a faster response. #include <GUIConstants.au3> Opt("GUICoordMode", 2) $nWindow = GUICreate ("My InputBox",190,114,-1,-1,$WS_SIZEBOX+$WS_SYSMENU); start the definition GUISetIcon ("Eiffel Tower.ico") GUISetFont (8,-1,"Arial") GUICtrlCreateLabel ("Prompt", 8,7); add prompt info GUICtrlSetResizing (-1,$GUI_DOCKLEFT+$GUI_DOCKTOP) $nEdit = GUICtrlCreateInput ("Default", -1,3,175,20,$ES_PASSWORD); add the input area GUICtrlSetState ($nEdit,$GUI_FOCUS) GUICtrlSetResizing ($nEdit,$GUI_DOCKBOTTOM+$GUI_DOCKHEIGHT) $nOk = GUICtrlCreateButton ("OK",-1,3,75,24); add the button that will close the GUI GUICtrlSetResizing ($nOk,$GUI_DOCKBOTTOM+$GUI_DOCKSIZE+$GUI_DOCKVCENTER) $nCancel = GUICtrlCreateButton ("Annuler", 25,-1); add the button that will close the GUI GUICtrlSetResizing ($nCancel,$GUI_DOCKBOTTOM+$GUI_DOCKSIZE+$GUI_DOCKVCENTER) GUISetState () ; to display the GUI ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop ElseIf $msg = $GUI_EVENT_MOUSEMOVE Then $WinPos = WinGetPos($nWindow, "") If $WinPos[2] < 190 Then WinMove($nWindow, "", $WinPos[0], $WinPos[1], 190, $WinPos[3]) EndIf If $WinPos[3] < 114 Then WinMove($nWindow, "", $WinPos[0], $WinPos[1], $WinPos[2], 114) EndIf EndIf Wend
  13. I would like to know this as well. I've been messing around with ways to do it, but no luck so far.
  14. I never really liked getting beta programs all too much, but I suppose I could give it a look.
  15. I will leave the second list out for now. Thanks for all your help, jpm.
  16. Ahh awesome. When will it be released or is it available to the public now?
  17. In the first message box, the data selected in the child list view ($ChildList) is not correct data shown with GUICtrlRead(GUICtrlRead($ChildList)).. The second message box shows what I am suppose to get. Here is a screen shot of the first message box and then the second. In the parent list view I have the first item selected. In the child list view I also have the first item selected. Look at the outcomes. The child list view is reading what is in the parent list view. And if you select others in the child list view, it reads not what it is suppose to. I hope this clears up my problem. http://starky.dnsalias.net/msgbox1.jpg http://starky.dnsalias.net/msgbox2.jpg
  18. Any ideas?
  19. I seem to be having a bit of trouble creating multiple list views. When I try to read selected data from the second list view, it reads a completely different controlID. I have posted an example below. Select item 1 in the child list and hit enter to see what I mean. I am working on a workaround for now. #include <GUIConstants.au3> HotKeySet("{ENTER}", "ShowInfo") Func ShowInfo() $x = GUICtrlRead($ParentList) $y = GUICtrlRead($x) $x2 = GUICtrlRead($ChildList) $y2 = GUICtrlRead($x2) MsgBox(0, "List", "Parent List: " & $x & " ~ " & $y & @CRLF & "Child List: " & $x2 & " ~ " & $y2) $x3 = $ParentListItem1 $y3 = GUICtrlRead($ParentListItem1) $x4 = $ChildListItem1 $y4 = GUICtrlRead($ChildListItem1) MsgBox(0, "Item", "Parent: " & $x3 & " ~ " & $y3 & @CRLF & "Child List: " & $x4 & " ~ " & $y4) EndFunc $GUIWidth = 250 $GUIHeight = 250 $ParentWin = GUICreate("Parent GUI", $GUIWidth, $GUIHeight) $ParentList = GUICtrlCreateListView("1|2|3|4|5", 15, 15, 200, 200, $LVS_NOSORTHEADER) $ParentListItem1 = GUICtrlCreateListViewItem("P-1-1|P-1-2|P-1-3|P-1-4|P-1-5", $ParentList) $ParentListItem2 = GUICtrlCreateListViewItem("P-2-1|P-2-2|P-2-3|P-2-4|P-2-5", $ParentList) GUISetState() ;$ChildWin = GUICreate("Child GUI", $GUIWidth, $GUIHeight) $ParentWin_Pos = WinGetPos($ParentWin, "") $ChildWin = GUICreate("Child GUI", $GUIWidth, $GUIHeight, $ParentWin_Pos[0] + 100, $ParentWin_Pos[1] + 100, -1, -1, $ParentWin) $ChildList = GUICtrlCreateListView("1|2|3|4|5", 15, 15, 200, 200, $LVS_NOSORTHEADER) $ChildListItem1 = GUICtrlCreateListViewItem("C-1-1|C-1-2|C-1-3|C-1-4|C-1-5", $ChildList) $ChildListItem2 = GUICtrlCreateListViewItem("C-2-1|C-2-2|C-2-3|C-2-4|C-2-5", $ChildList) $ChildListItem3 = GUICtrlCreateListViewItem("C-3-1|C-3-2|C-3-3|C-3-4|C-3-5", $ChildList) GUISetState() While 1 $msg = GUIGetMsg(1) Select Case $msg[0] = $GUI_EVENT_CLOSE If $msg[1] = $ChildWin Then GUISwitch($ChildWin) GUIDelete() ElseIf $msg[1] = $ParentWin Then GUISwitch($ParentWin) GUIDelete() Exit EndIf EndSelect WEnd
×
×
  • Create New...