Medic873
Active Members-
Posts
204 -
Joined
-
Last visited
Medic873's Achievements
Polymath (5/7)
0
Reputation
-
Executing code from input box
Medic873 replied to Medic873's topic in AutoIt General Help and Support
Wow never saw that command in the help file. Thanks so much -
So I have a question I have never needed to cross this bridge but it finally came up at work today. I need to execute some code that is going be inputed from a inputbox. For example [script] msgbox("Hello", "Hello"); $code = inputbox("hello", "hello"); ;Then right here it would take the variable $code and run its code that was just entered through the input box. Does tamake sense. [/script]
-
Hello, I am trying to make a simple script. The basic concept is it will automatically re size windows on to each monitor so I don't waste time re sizing them. I understand how to re size them easily WinMove('C:\Users\medic_000\Desktop\Monitor 1.au3 - SciTE-Lite', "", 1919, 0, 1280, 1040) Here is what I need / am confused about I understand the winactive function but I need something that will give me the title of the window that is currently active so basically it would just set that as a variable and then re size witch ever window I have active currently Any help on this would be greatly appreciated. Thanks
-
I am curious if someone that understands the Skype UDF could answer a simple question for me. Is it possible for me to make a simple script that would call a phone number play a recording and know if the users presses a button then hang up. Thanks any help is greatly helpful
-
here is all my code still can not figure out have tried changing so many things #include <IE.au3> #include <array.au3> #Include <File.au3> #include <string.au3> #include <INet.au3> Local $tempfile = FileOpen("C:\Users\Medic873\Desktop\directory stuff\here.txt", 1) $Url = 'http://www.bbb.org/search/?type=category&input=flooring&location=Austin%2c+TX&filter=business&accredited=&radius=50&country=USA,%20CAN&language=en&codeType=YPPA&page=1&source='; $TodaysDate = InputBox("Todays Date", "Please enter todays date in the fallowing format. YYYY-MM-DD"); $AudioFile = "file.mp3"; $BBBHTML = _INetGetSource($Url);Pulls the data from the address InetClose ($BBBHTML);Closes the connection to yellow pages $HowManyPagesAreThereStart = _StringBetween($BBBHTML, ' <li class="disabled"><span>...</span></li>', '</li>'); $HowManyPagesThereAre = _StringBetween($HowManyPagesAreThereStart[0], '">', '</a>'); $PageCount = 1; Do $Url = 'http://www.bbb.org/search/?type=category&input=flooring&location=Austin%2c+TX&filter=business&accredited=&radius=50&country=USA,%20CAN&language=en&codeType=YPPA&page=' & $PageCount & '&source='; $BBBHTML = _INetGetSource($Url);Pulls the data from the address InetClose ($BBBHTML);Closes the connection to yellow pages $BBBListingHTML = _StringBetween($BBBHTML, '<td class="business-info">', '</td> '); $i = 0; Do $BBBListingUrl = _StringBetween($BBBListingHTML[$i], 'href="', '">'); FileWriteLine($tempfile, $BBBListingUrl[0]); $i = $i + 1; Until (Ubound($BBBListingHTML) = $i); $PageCount = $PageCount + 1; Until $PageCount = $HowManyPagesThereAre[0] FileClose($tempfile);Closes File For A second Local $tempfile = FileOpen("C:\Users\Medic873\Desktop\directory stuff\here.txt", 0) Local $FinishFile = FileOpen("C:\Users\Medic873\Desktop\directory stuff\finish.txt", 1); $PullContactInformation = 1; $TotalBBBPages = _FileCountLines($tempfile); Do $Contact = 0; $BBBUrl = FileReadLine($tempfile, $PullContactInformation) $BBBContactHTML = _INetGetSource($BBBUrl); InetClose ($BBBContactHTML);Closes the connection to the BBB $Name = _StringBetween($BBBContactHTML, '<meta itemprop="legalName" content="', '" />'); If UBound($Name) > 0 Then $Contact = 1; EndIf $PhoneNumber = _StringBetween($BBBContactHTML, '<meta itemprop="telephone" content="', '" />'); $City = _StringBetween($BBBContactHTML, '<meta itemprop="addressLocality" content="', '" />'); $State = _StringBetween($BBBContactHTML, '<meta itemprop="addressRegion" content="', '" />'); $Website = _StringBetween($BBBContactHTML, '<meta itemprop="url" content="', '" />'); If $Contact = 0 Then FileWriteLine($FinishFile , "," & $TodaysDate & "," & $Name[0] & "," & $City[0] & "," & $State[0] & "," & $PhoneNumber[0] & "," & "NA" & "," & $BBBUrl & "," & "" & "," & $AudioFile & "," & "0000-00-00"); EndIf $PullContactInformation = $PullContactInformation + 1; Until $PullContactInformation = $TotalBBBPages
-
Hmmm I still have a error and I cant find out why $Contact = 0; $BBBUrl = FileReadLine($tempfile, $PullContactInformation) $BBBContactHTML = _INetGetSource($BBBurl); InetClose ($BBBContactHTML);Closes the connection to the BBB $Name = _StringBetween($BBBContactHTML, '<meta itemprop="legalName" content="', '" />'); If UBound($Name) <> 0 Then $Contact = 1; EndIf $PhoneNumber = _StringBetween($BBBContactHTML, '<meta itemprop="telephone" content="', '" />'); If UBound($PhoneNumber) <> 0 Then $Contact = 1; EndIf $City = _StringBetween($BBBContactHTML, '<meta itemprop="addressLocality" content="', '" />'); If Ubound($City) <> 0 Then $Contact = 1; EndIf $State = _StringBetween($BBBContactHTML, '<meta itemprop="addressRegion" content="', '" />'); If Ubound($State) <> 0 Then $Contact = 1; EndIf $Website = _StringBetween($BBBContactHTML, '<meta itemprop="url" content="', '" />'); If Ubound($Website) <> 0 Then $Contact = 1; EndIf If $Contact = 0 Then $FinishedFile = "C:\Users\Medic873\Desktop\directory stuff\finish.txt"; FileWriteLine($FinishedFile , "," & $TodaysDate & "," & $Name[0] & "," & $City[0] & "," & $State[0] & "," & $PhoneNumber[0] & "," & "NA" & "," & $BBBUrl & "," & "" & "," & $AudioFile & "," & "0000-00-00"); EndIf
-
Thanks I just code not find that snippet anywhere. Thank You So Much
-
I searched the forum and the help file but I can not find a statement for not equal. Just want to write a line to stop code from erroring out like such if ubound($Name) != 0 Then EndIf
-
Don't know why my sample data of the file didnt post but here it is Customer Name,Full Customer Number,Store Number,Kiosk First Sale Date,Item Number,1/7/2012,1/14/2012,1/21/2012,1/28/2012,2/4/2012,2/11/2012,2/18/2012,2/25/2012,3/3/2012,3/10/2012,3/17/2012,3/24/2012,3/31/2012,4/7/2012,4/14/2012,4/21/2012,4/28/2012,5/5/2012,5/12/2012,5/19/2012,5/26/2012,6/2/2012,6/9/2012,6/16/2012,6/23/2012,6/30/2012,7/7/2012,7/14/2012,7/21/2012,7/28/2012,8/4/2012,8/11/2012,8/18/2012,8/25/2012,9/1/2012,9/8/2012,9/15/2012,9/22/2012,9/29/2012,10/6/2012,10/13/2012,10/20/2012,10/27/2012,11/3/2012,11/10/2012,11/17/2012,11/24/2012,12/1/2012,12/8/2012,12/15/2012,12/22/2012,12/29/2012 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7322-1139,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,4,,,,,3,8,1 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7323-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,8,,,,,,2,20,8 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7324-18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,2,,,,,6,9,2 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7324-20,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6,4,,,,,9,19,13 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7337-02,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,8,,,,,6,28,11 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7337-626,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,1,,,,,2,10,4 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7750-04,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,4,,,,,6,22,10 what #5893 (NOVI; MI),1012079,5893,07/18/2012,7750-05,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,10,3,,,,,4,11,2
-
Okay, I have the fallowing code and the purpose is to convert some data so if a colum has a number in it the code will create a whole line for that date. While looping through I get off some how if someone can look at this it would help greatly all help is appreciated #include <IE.au3> #include <array.au3> #Include <File.au3> #include <string.au3> #include <INet.au3> $file = FileOpen("C:\Users\Medic873\Desktop\walmart backup.csv", 0) $finisheddocument = FileOpen("C:\Users\Medic873\Desktop\finisheddocument.txt", 1); Local $line = FileReadLine($file, 2) $datadivided = StringSplit($line, ',', 1) Local $datesstart = FileReadLine($file, 1) $dates = StringSplit($datesstart, ','); _ArrayDisplay($datadivided); For $x = 0 To ubound($datadivided) Step +1 $variablenumber = $x + 6; if $datadivided[$x] = "" Then Else FileWriteLine($finisheddocument, $datadivided[1] & ',' & $datadivided[2] & ',' & $datadivided[3] & ',' & $datadivided[4] & ',' & $datadivided[5] & ',' & $dates[$variablenumber] & ',' & $datadivided[$variablenumber]) EndIf Next _arraydisplay($datadivided);
-
Never mind I found Jons email udf and this works great '?do=embed' frameborder='0' data-embedContent>> This is the best script I have used all night thanks so much
-
I have been working on making a basic script that will open a godaddy web email compose link. All this should do is give me a nice little space to enter a email along with a message to basicly email myself. I tried using the email UDF but it only works with gmail I discovered. But here is what I have so far The only problem with this nice little scirpt is that for some reason it keeps giving me a error after logging in that says Line 585 WEnd WEnd^ ERROR This script is no where near 585 lines I am confused thanks. #include <IE.au3> #include <array.au3> #Include <File.au3> #include <string.au3> #include <INet.au3> #include <Excel.au3> $oIE = _IECreate("https://email22.secureserver.net/pcompose.php"); _IELoadWait($oIE); Sleep(100); $HTML = _IEDocReadHTML($oIE); $Title = _stringBetween($HTML, '<title>', '</title>'); if $Title[0] = "Workspace Login" Then $oForm = _IEFormGetObjByName ($oIE, "login_form");Runs the form of the webpage $EmailUsernameFeild= _IEFormElementGetObjByName ($oForm, "username");Enters the password _IEFormElementSetValue ($EmailUsernameFeild, "MyUSERNAME");Enters the password $EmailPasswordFeild= _IEFormElementGetObjByName ($oForm, "password");Enters the password _IEFormElementSetValue ($EmailPasswordFeild, "MyPASSWORD");Enters the password _IEFormSubmit($oForm); EndIf
-
Okay I am new to functions and have very little experience with them. What I want is to have it where I define a variable called stock symbol and then it will use the function pulldata and pull all of the information as the two array #include <IE.au3> #include <array.au3> #Include <File.au3> #include <string.au3> #include <INet.au3> Global $StockSymbol = InputBox("Stock Symbol", "Enter stock symbol"); Func PullData() $x = 0;This keeps track of the loop for Stock One $BloombergDataDirty = _INetGetSource('http://www.bloomberg.com/quote/' & $StockSymbol & ':US');Pulls bloombergs data InetClose ($BloombergDataDirty);Closes the connection to bloomberg $BloombergData = _StringBetween($BloombergDataDirty, '"data_values":[', '],"');This seperates the data set $BloombergDataSet = _StringBetween($BloombergData[0], '[', ']'); $totalcount = Ubound($BloombergDataSet); Local $StockOneTime[1]; Local $StockOnePrice[1]; Do $Finished = StringSplit($BloombergDataSet[$x], ','); _ArrayAdd($StockOneTime, $Finished[1]); _ArrayAdd($StockOnePrice, $Finished[2]); $x = $x + 1; Until $x = $totalcount EndFunc _ArrayDisplay($StockOneTime); _ArrayDisplay($StockOnePrice);
-
hmm second time this has happened it didnt include what I put in my message after the code. I wan this to exclude anything that is a /ofiheif.html type of link or anything that is a yellowpages.com/ type of link how would I do this Thanks
-
Hello, I am pulling information from yellow pages and seem to be having a issue I want to pull any website's that are not internal links or yellowpages.com here is my current code #include <IE.au3> #include <array.au3> #Include <File.au3> #include <string.au3> #include <INet.au3> #include <Excel.au3> $YellowPagesUrl = "http://www.yellowpages.com/phoenix-az/pet-store?g=Phoenix%2C+AZ&page=2&q=pet+store";This will help us on finding the next URL. $i = 1;This will keep track of how many pofiles we have pulled from linkedin $YellowPages = _INetGetSource($YellowPagesUrl);Pulls the data from the address InetClose ($YellowPages);Closes the connection to linkedin $YellowPagesWebsite = _StringBetween($YellowPages, '<a href="', '"');List out all yellow pages links _ArrayDisplay($YellowPagesWebsite);