Jump to content

eson

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by eson

  1. Hello, I tryed not to post but I could not find the reason my short script is not working. I'm trying to fill and submit a very simple form (secure) but the result I get is the same form page I started with, not the expected result page (as after pressing the submit button). Could you help me, please? My script: #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include "WinHttp.au3" Opt("MustDeclareVars", 1) ; !!!Note that this example will fail because of invalid username and password!!! ; Use real data for authentication Global $sUserName = "12345678909" Global $sPassword = "11111970" Global $sDomain = "ccd.serpro.gov.br" Global $sPage = "correios/acecpfa1/solicitar.html" Global $sAdditionalData = "cpF=" & $sUserName & "&nasC=" & $sPassword ; Initialize and get session handle Global $hOpen = _WinHttpOpen() ; Get connection handle Global $hConnect = _WinHttpConnect($hOpen, $sDomain) ; SimpleSSL-request it... Global $sReturned = _WinHttpSimpleSSLRequest($hConnect, "POST", $sPage, Default, $sAdditionalData) ; Close handles _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; See what's returned MsgBox(0, "Returned", $sReturned)
  2. Thank you again Yoriz! You are right, while the function called by the first GUI don't finish (returns), the second GUI never trigger a function! This is not documented and it is not intuitive, at last for me. I think that if you create a GUI with a control that trigger a function, is shoul be that way! The control must call the function. I dont see the reason why the function is not called. I mean, I see the fact (the trigger dont work because the GUI was created iside a function trigged by a previous GUI) but I think it is not suposed to be that way. Maybe someone from AutoIt could help with that. Thank you again! Now I know what was wrong and will work with the facts.
  3. Thank you Yoriz, I see that removing the second loop it works. But I really don't understand why!! If I understand well, the command GUICtrlSetOnEvent($SecondButton, "OK") means that the 'OK' function should be called when the SecondButton is pressed. So, why the message on the 'OK' function never appears? Why while in the loop (the commented second loop) the function 'OK' is not activated when I press the SecondButton? What the first loop has that the second don't? Why while in the first loop the 'OK' function is called and while in the second loop it is not? I think that because of the command GUICtrlSetOnEvent($SecondButton, "OK") the ‘OK’ function should be called whenever I press the SecondButton and return to the point it was after the function finish. I see that in my example script I'm stucked in the second loop because there is no way to escape the loop. But I think that at least the function 'OK' should be activated (while in the second loop) when I press the SecondButton. Could you help me understand this? Thank you.
  4. Hello, I'm trying to make a simple GUI that when a button is pressed a second GUI appears. In the second GUI (that also has a button) if I click the button I see a message. That is all. I really don't know what is wrong with my very simple script. The problem is that when the second GUI appears, it is unresponsive. I click the button and nothing... The little code is below. Could you help me? #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> Opt("GUIOnEventMode", 1) $MainGUI = GUICreate("Main", 190, 49, 570, 115) GUISetOnEvent($GUI_EVENT_CLOSE, "End") $MainButton = GUICtrlCreateButton("Main OK", 12, 12, 75, 25) GUICtrlSetOnEvent($MainButton, "CreateSecondGUI") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func CreateSecondGUI() $SecondGUI = GUICreate("Second", 190, 49, 570, 215) GUISetOnEvent($GUI_EVENT_CLOSE, "End") $SecondButton = GUICtrlCreateButton("Second OK", 12, 12, 75, 25) GUICtrlSetOnEvent($SecondButton, "OK") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd EndFunc Func OK() MsgBox(0, "", "Child OK pressed") EndFunc Func End() MsgBox(0, "", "The End") Exit EndFunc
  5. Kip, Is it possible to include scroll bar moviment with the mouse wheel? Thank you, eson.
  6. Hello, I'm having some problems with your function. I have the following 2d array (col1 = names; col2 = numbers). I use TAB as the separator. JULIETA 2 STEFANY 1 ROGERIO 1 CLARICE 1 JOAO 1 LUIZ 2 MATEU 2 LUCAS 1 FRANCO 1 MARIA 1 ADRIANA 1 I want to sort (ascendant) by the second column (the numbers). After sort, the first line of the array should be "STEFANY 1" as it is the first line with the number 1. But your function gives me "MARIA 1" as the first line! Why? Thank you.
  7. Dale, Thank you for your help. The problem was so strange that I formated my HD and reinstalled Windows, etc. The problem is now solved. IE.au3 is working. Thank you. Eduardo.
  8. When I run the code a window with the title "Microsoft Internet Explorer appears. This is not the right title of IE7 that uses "Windoes Internet Explorer" instead. Also, the look of the browser is totally different of the IE7. Maybe the window is an explorer (windows explorer) trying to open a web page. My sequence is: 1) I run the code 2) a Window with title "Microsoft Internet Explorer appears but no page is loaded 3) After 5 sec. the following message pops-up: In Portuguese: "O Windows não pode acessar o dispositivo, caminho ou arquivo especificado. Talvez você não tenha as permissões adequadas para acessar o item". The translate would be like this: "Windows cannot access the device, the path or the specified archive. Perhaps you does not have the right permission to access the item." 4) The browser (or whatever it is) hangs with no page loaded 5) I press the OK button on the message. Another blank browser appears and another message pos-up. 6) I press CTRL+ALT+DEL and ended the programs instances (Internet explorer) Some rare times, after the "Internet explorer" appears, (+- 5 sec.) a true "Windows Explorer" (IE7) windows appears and start to load the page. The page is loaded but hangs. This is difficult to reproduce. Most of the time the sequence above (1-6) is what I have. I'm NOT running Windows Vista. I'm running Windows XP SP2. I'm not running IE6, I updated to IE7 long time ago. I'm the only user of the computer. It is my personal notebook, I'm the only user and have full administration rights. I'm using the latest version of AutoIt3 and AutoIt3 BETA, with the SciTE editor. All installed normaly with the installers. I already tried to reinstall. I'm not sure that the browser window that appears is really IE6. Maybe it is an windows explorer window trying to load a web page. As it hangs, I could not open the About menu to check. But it is not the Windoes Internet Explorer 7 windows. Thank you, Eduardo.
  9. Hello, Im just trying to use IE.AU3 to load a single web page with the following code: #include <IE.au3> _IECreate("www.terra.com.br") When I try the code AutoIt apparently try to open the page with the old IE6 (Im using IE7!!). The title of the browser that opens is Microsoft Internet Explorer and it just hangs before loading the page. Some times this old browser (IE6) opens, remains for a moment and then the the IE7 appears and try to open the page on a Tab and hangs. I have to use CTRL+ALT+DEL to close the browser. The problem is not the page. I tried _IE_Example ( "basic" ) and the result is the same. (old IE6 try to open and hangs). Im using WinXP SP2 + IE7. All updated. Could you help?? PS: sorry about my english.
×
×
  • Create New...