
PHPWarner
Active Members-
Posts
25 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by PHPWarner
-
cURL UDF - a UDF for transferring data with URL syntax
PHPWarner replied to seangriffin's topic in AutoIt Example Scripts
Can we use this cURL UDF for HTTP POST requests or only GET available? -
@jdelaney, thank you very much for your code it generate random numbers but their first number is always "zero". @BrewManNH, your help is very useful, thank you very much. $stest = StringFormat("%08s", Random(1, 99999999, 1)) MsgBox ( 1,1, $stest ) works fine. Can I use serial numbers using this code below? $number=00000001 while $number < 99999999 ... $number = $number+1 wend Does it increase to 00000002 00000003 etc?
-
Hello, I need little help for random number generator code, I want to start generate serial numbers between 00000001 - 00000002 - 00000003 - 00000004 ... 00000010 - 00000011 ... until 99999999. Can anyone help me for that? Also second issue, generating random 8 numeric digits code is very useful for me Thanks now.
-
Is it working on selected image?
-
Hello, Does anyone know that how to scan any image (it contains regular text) on computer (C:\sample-image.jpg) and write it as text file (example: output-sample-image.txt)? I think it should made with Tesseract OCR but I really need sample code for learning. sample-image.jpg and output-sample-image.txt are attached. Many thanks now. output-sample-image.txt
-
Hello, Does anyone know that how can I get session value (generated with PHP code below) from internet explorer? $_SESSION["test"] = "demo"; On PHP, I can use it for other pages using this code below: session_start() echo $_SESSION["test"]; // returns with demo So is there any code sample for AutoIt that get _SESSION value on selected site?
-
Thank you so much.
-
Okay, it seems to be checked value is 1 and unchecked value is 4. Please update me if I am wrong. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Form1", 231, 215, 462, 210) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox Test 1", 32, 16, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox Test 2", 32, 40, 97, 17) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox Test 3", 32, 64, 97, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Checkbox4 = GUICtrlCreateCheckbox("Checkbox Test 4", 32, 88, 97, 17) $Checkbox5 = GUICtrlCreateCheckbox("Checkbox Test 5", 32, 112, 97, 17) $Button1 = GUICtrlCreateButton("Button1", 24, 136, 89, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Button2", 120, 136, 81, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "Checkbox Test 1", GUICtrlRead($Checkbox1)) MsgBox(0, "Checkbox Test 2", GUICtrlRead($Checkbox2)) MsgBox(0, "Checkbox Test 3", GUICtrlRead($Checkbox3)) GUICtrlSetState($Checkbox1, $GUI_CHECKED) MsgBox(0, "Checkbox Test 1", GUICtrlRead($Checkbox1)) EndSwitch WEnd
-
It is getting error on GUICtrlRead($Checkbox1) = $GUI_CHECKED #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Form1", 231, 215, 462, 210) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 32, 16, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 32, 40, 97, 17) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 32, 64, 97, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 32, 88, 97, 17) $Checkbox5 = GUICtrlCreateCheckbox("Checkbox5", 32, 112, 97, 17) $Button1 = GUICtrlCreateButton("Button1", 24, 136, 89, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Button2", 120, 136, 81, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlRead($Checkbox1) = $GUI_CHECKED GUICtrlSetState($Checkbox1, $GUI_CHECKED) EndSwitch WEnd
-
One addition to my question. Is it possible to check all or check none options? If yes, how to do it?
-
Hello, I need little help for checkboxes on GUI. Here is my sample form: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 206, 158, 192, 124) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 32, 16, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 32, 40, 97, 17) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 32, 64, 97, 17) $Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 32, 88, 97, 17) $Checkbox5 = GUICtrlCreateCheckbox("Checkbox5", 32, 112, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd My question is, when I want to get value (checked or not) on $Checkbox1 with GUICtrlRead($Checkbox1) is it showing that label, Checkbox1 but I want to get checked or not value on one of the checkboxes. So how can I get value for checkboxes or radio buttons? Thank you so much.
-
How to creating IE with maximize?
PHPWarner replied to PHPWarner's topic in AutoIt General Help and Support
This is the code that I want Working perfect. Thank you so much for all of the friends. -
Hello dear friends, My code is: $oIE = _IECreate("http://www.google.com", @SW_MAXIMIZE) I want to start IECreate with MAXIMIZE, starting via shell is okay but IECreate does not work. $Url = "http://www.google.com" ShellExecute(@programFilesDir & "\Internet Explorer\iexplore.exe", $Url, "", "", @SW_MAXIMIZE) Thanks in advice.
-
How To Select Random Images In One Of The Folder
PHPWarner replied to PHPWarner's topic in AutoIt General Help and Support
Thank you so much Yashied -
How To Select Random Images In One Of The Folder
PHPWarner replied to PHPWarner's topic in AutoIt General Help and Support
Update: I did sample code for explain my problem. $PicFolder = "C:\Images" $ImagesList = _FileListToArray($PicFolder) $Img = Random(1, $ImagesList[0], 1) $iPic = $PicFolder & "\" & $Img & ".jpg" This code selecting random image on C:\Images but all image names should be 1.jpg 2.jpg 3.jpg etc... If one of the image name is DSC_01.jpg it is not selecting this image. So need more global selection code. Thanks now. -
Hello, I need code sample for select one of the image on selected folder. For example, there are 20 images in C:\Images folder. I need to random select one of the image on this folder. 20 images are completely example so I guess the script should count total images on the selected folder and random select. Many thanks in advice.
-
Thank you so much.
-
Hello friends, I need to little help for find a solution to my problem. I've 2 simple GUI, the first one is main GUI included about button and quit button. The second GUI is the about box, which contains product information and OK button which I want to close only about GUI and then return to the main GUI. Below is the sample codes: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Main", 192, 64, 192, 114) $About = GUICtrlCreateButton("About", 16, 16, 75, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Quit", 96, 16, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $About $Form2 = GUICreate("About", 324, 241, 425, 149) GUISetIcon("D:\006.ico") $GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185) $Image1 = GUICtrlCreatePic("", 16, 24, 105, 97, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Label1 = GUICtrlCreateLabel("Product Name", 152, 24, 72, 17, $WS_GROUP) $Label2 = GUICtrlCreateLabel("Version", 152, 48, 39, 17, $WS_GROUP) $Label4 = GUICtrlCreateLabel("Comments", 16, 160, 53, 17, $WS_GROUP) $Label3 = GUICtrlCreateLabel("Copyright", 16, 136, 48, 17, $WS_GROUP) GUICtrlCreateGroup("", -99, -99, 1, 1) $Close_Button = GUICtrlCreateButton("&OK", 112, 208, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Close_Button Exit ; this is closing app completely, I want to close only about GUI and then return to the main GUI EndSwitch WEnd EndSwitch WEnd So many thanks in advice.
-
How to select random string in array
PHPWarner replied to PHPWarner's topic in AutoIt General Help and Support
It worked. Many thanks . -
Hello, Can I do something similar as my PHP code on AutoIt? $quotes[] = "A1"; $quotes[] = "B1"; srand ((double) microtime() * 1000000); $random_quote = rand(0, count($quotes) - 1); $random_quote = $quotes[$random_quote]; Thanks in advice.
-
IE Auto Upload File
PHPWarner replied to BruceCopperField's topic in AutoIt General Help and Support
I need this too -
Okay my final codes are below, but uploading image still does not work, maybe I've made a mistake. Could you please check it for me? #include <IE.au3> $oIE = _IECreate ("http://www.site.com/upload_file.php") $oForm = _IEFormGetCollection ($oIE, 0) $iFile = "C:\4287_2009121527.jpg" $oInput = _IEFormElementGetObjByName($oForm, "photo") _IEAction($oInput, "focus") $hIE = _IEPropertyGet($oIE, "hwnd") ControlSend($hIE, "", "", $iFile) $oButton = _IEFormElementGetObjByName ($oForm, "submit") _IEAction($oButton, "click") It is running focus but it didn't select image file and upload
-
Thanks for your helps. Everything works fine until this code. $hIE = _IEPropertyGet($oIE, "hwnd") ControlSend($hIE, "", "", $sCAB) I don't understand hwnd meaning? Thanks.
-
So it should be like that? #include <IE.au3> $oIE = _IECreate ("http://www.site.com/upload_file.php") $oForm = _IEFormGetCollection ($oIE, 0) $IE_Parent = GUICreate ("Hidden IE window", 1000, 800) $IE_Object = ObjCreate ("Shell.explorer.2") $IE_Ctrl = GUICtrlCreateObj ($IE_Object, 2, 2, 1000, 800) $sFile = 'C:\2009122147.jpg' $IE_Object.document.getElementById("photo").focus() ControlSend ($IE_Parent, "", GUICtrlGetHandle ($IE_Ctrl), $sFile, 1) $oButton = _IEFormElementGetObjByName ($oForm, "submit") _IEAction($oButton, "click") $oButton = _IEFormElementGetObjByName ($oForm, "submit") _IEAction($oButton, "click") But it didn't work. I guess I did a mistake on codes.
-
Hello, That is my first time for meet with AutoIt but I am very pleased to use it. Thanks for developers for AutoIt. My question is, How can I upload any picture to the any web site. I am using this code: #include <IE.au3> $oIE = _IECreate ("http://www.site.com/upload_file.php") $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetObjByName ($oForm, "photo") _IEFormElementSetValue ($oQuery, "C:\2009122147.jpg") $oButton = _IEFormElementGetObjByName ($oForm, "submit") _IEAction($oButton, "click") It should be upload "C:\2009122147.jpg" to the web site. But, I guess <input type="file"> does not accept direct values. So I am very please for your advice. Thanks now.