Jump to content
Sign in to follow this  
yucatan

how to fix this..

Recommended Posts

yucatan

hi i have a problem i want to make something a kind of loop

i have 122 $vars

like this

$s_SmtpServer1 = ".."

$s_SmtpServer2 = ".."

and this want a look that a fuction eatch time that he runs get the next $ so that he do it the first time with $s_SmtpServer1 = ".."

and he stops at $s_SmtpServer122 = ".." is this possebel i just dont know how to fix this..

Share this post


Link to post
Share on other sites
PsaltyDS

hi i have a problem i want to make something a kind of loop

i have 122 $vars

like this

$s_SmtpServer1 = ".."

$s_SmtpServer2 = ".."

and this want a look that a fuction eatch time that he runs get the next $ so that he do it the first time with $s_SmtpServer1 = ".."

and he stops at $s_SmtpServer122 = ".." is this possebel i just dont know how to fix this..

Use an array instead of many named variables:

Global $avSmtpServers[122]

For $n = 0 to 121
     $avSmtpServers[$n] = ".."
Next

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
weaponx

You really should try posting in your native language.

This is what arrays are meant for. Arrays are zero indexed so the first element is zero and the last element is array length minus one.

Dim $array[122]

$array[0] = ""

$array[1] = ""

$array[2] = ""

...

$array[119] = ""

$array[120] = ""

$array[121] = ""

Share this post


Link to post
Share on other sites
Richard Robertson

For i = 1 To 122
    Eval("s_SmtpServer" & i) = ".."
Next

Ought to work. An array is a much better solution though.

Edit: everyone else posted while I was reading another page. :)

Edited by Richard Robertson

Share this post


Link to post
Share on other sites
martin

For i = 1 To 122
    Eval("s_SmtpServer" & i) = ".."
Next

Ought to work. An array is a much better solution though.

Edit: everyone else posted while I was reading another page. :)

I wonder what it was you were reading! Obviously it was very distracting.

I think you meant more like this

For $i = 1 To 122
  Assign("s_SmtpServer" & $i,"something",2)
next

But yes, I think arrays would be better too.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
yucatan

i shall show the code now maby u guys can explane it bether to me then..

this is my code now

#include <INet.au3>

#NoTrayIcon

$teller = "1"

$s_SmtpServer = "$s_SmtpServer"

$s_SmtpServer1 = "mail.amaze.net.au"

$s_SmtpServer2 = "mailhost.col.ameritech.net"

$s_SmtpServer3 = "aol.com"

$s_SmtpServer4 = "za.mx.aol.com"

$s_SmtpServer5 = "zb.mx.aol.com"

$s_SmtpServer6 = "zc.mx.aol.com"

$s_SmtpServer7 = "smtp1.attglobal.net"

$s_SmtpServer8 = "mailhost.worldnet.att.net"

$s_SmtpServer9 = "mailhost.att.net"

$s_SmtpServer10 = "mailhost.worldnet.att.net"

$s_SmtpServer11 = "mail.australink.net"

$s_SmtpServer12 = "smtpout.bellatlantic.net"

$s_SmtpServer13 = "smtp.mail.yahoo.com"

$s_SmtpServer14 = "smtp.blueyonder.co.uk"

$s_SmtpServer15 = "mail1.oznet.net.au"

$s_SmtpServer16 = "mailhost.breathemail.net"

$s_SmtpServer17 = "mail.bright.net"

$s_SmtpServer18 = "mail.btclick.com"

$s_SmtpServer19 = "smtp.btconnect.com"

$s_SmtpServer20 = "mail.btinternet.com"

$s_SmtpServer21 = "mail.btopenworld.com"

$s_SmtpServer22 = "smtp.businessserve.co.uk"

$s_SmtpServer23 = "smtp.blueyonder.co.uk"

$s_SmtpServer24 = "relay.clara.net"

$s_SmtpServer25 = "smtp.comcast.net"

$s_SmtpServer26 = "smtp.cs.com"

$s_SmtpServer27 = "mail.compuserve.com"

$s_SmtpServer28 = "smtp.east.cox.net"

$s_SmtpServer29 = "smtp.west.cox.net"

$s_SmtpServer30 = "smtp.ntlworld.com"

$s_SmtpServer31 = "postoffice.dca.net"

$s_SmtpServer32 = "post.demon.co.uk"

$s_SmtpServer33 = "smtp.earthlink.net"

$s_SmtpServer34 = "smtp.easynet.co.uk"

$s_SmtpServer35 = "mail.ee.net"

$s_SmtpServer36 = "mail.ma.freei.net"

$s_SmtpServer37 = "smtp.freeserve.co.uk"

$s_SmtpServer38 = "smtp.freeserve.net"

$s_SmtpServer39 = "relay.free-online.co.uk"

$s_SmtpServer40 = "smtp.gateway.net"

$s_SmtpServer41 = "mail.genie.co.uk"

$s_SmtpServer42 = "mail.greenbank.net.au"

$s_SmtpServer43 = "mail.hotkey.net.au"

$s_SmtpServer44 = "smtp1.ibm.net"

$s_SmtpServer45 = "smtp.ic24.net"

$s_SmtpServer46 = "mailout.icdc.com"

$s_SmtpServer47 = "mail.nfolink.com"

$s_SmtpServer48 = "mail.your-net.com"

$s_SmtpServer49 = "post.inweb.co.uk"

$s_SmtpServer50 = "mail.iron.net"

$s_SmtpServer51 = "smtp.iwaynet.net"

$s_SmtpServer52 = "mail.jadeinc.com"

$s_SmtpServer53 = "smtp.lineone.net"

$s_SmtpServer54 = "mail.loa.com"

$s_SmtpServer55 = "mail.logicworld.com.au"

$s_SmtpServer56 = "smtp.lycos.co.uk"

$s_SmtpServer57 = "smtp.madasafish.com"

$s_SmtpServer58 = "smtp.meganet.net"

$s_SmtpServer59 = "smtp.email.msn.com"

$s_SmtpServer60 = "mail.midohio.net"

$s_SmtpServer61 = "smtp.mindspring.com"

$s_SmtpServer62 = "mail.mindspring.com"

$s_SmtpServer63 = "smtp.mistral.co.uk"

$s_SmtpServer64 = "smtp.email.msn.com"

$s_SmtpServer65 = "secure.smtp.email.msn.com"

$s_SmtpServer66 = "smtp.namestoday.ws"

$s_SmtpServer67 = "smtp.ix.netcom.com"

$s_SmtpServer68 = "smtp.netreach.net"

$s_SmtpServer69 = "mailhost.netscapeonline.co.uk"

$s_SmtpServer70 = "mail.netset.com"

$s_SmtpServer71 = "mail.netwalk.com"

$s_SmtpServer72 = "smtp.netzero.net"

$s_SmtpServer73 = "mail.nextek.net"

$s_SmtpServer74 = "smtp.nildram.co.uk"

$s_SmtpServer75 = "nni.com"

$s_SmtpServer76 = "mail.nn.net"

$s_SmtpServer77 = "smtp.ntlworld.com"

$s_SmtpServer78 = "mail.onetel.net.uk"

$s_SmtpServer79 = "mail.onetel.com"

$s_SmtpServer80 = "mail.marion.net"

$s_SmtpServer81 = "smtp.ozemail.com.au"

$s_SmtpServer82 = "mail.peoplepc.com"

$s_SmtpServer83 = "smtp-1.opaltelecom.net"

$s_SmtpServer84 = "smtp.dial.pipex.com"

$s_SmtpServer85 = "relay.plus.net"

$s_SmtpServer86 = "smtp.prodigy.net"

$s_SmtpServer87 = "smtp.purplenet.co.uk"

$s_SmtpServer88 = "smtp.rcn.com"

$s_SmtpServer89 = "mail.redbird.net"

$s_SmtpServer90 = "mail.richnet.net"

$s_SmtpServer91 = "mail.richnet.netsmtp-server.insight.rr.com"

$s_SmtpServer92 = "mail.richnet.netsmtp-server.columbus.rr.com"

$s_SmtpServer93 = "mail.richnet.netsmtp-server.nc.rr.com"

$s_SmtpServer94 = "mail.richnet.netsmtp.tiscali.co.uk"

$s_SmtpServer95 = "mail.richnet.netmail.spire.com"

$s_SmtpServer96 = "mail.richnet.netsmtp.supanet.com"

$s_SmtpServer97 = "mail.richnet.netsmtp.blueyonder.co.uk"

$s_SmtpServer98 = "mail.richnet.netmail.telocity.com"

$s_SmtpServer99 = "mail.richnet.netsmtp.tesco.net"

$s_SmtpServer100 = "mail.richnet.netmail.tesco.net"

$s_SmtpServer101 = "smtp.tiscali.co.uk"

$s_SmtpServer102 = "mail.totalise.co.uk"

$s_SmtpServer103 = "mail.tpg.com.au"

$s_SmtpServer104 = "mail.ttlc.net"

$s_SmtpServer105 = "smtp.ukgateway.net"

$s_SmtpServer106 = "uu.net"

$s_SmtpServer107 = "smtp.v21.co.uk"

$s_SmtpServer108 = "smtp.verizon.net"

$s_SmtpServer109 = "smtp.virgin.net"

$s_SmtpServer110 = "mail.vispa.com"

$s_SmtpServer111 = "mail.voicenet.com"

$s_SmtpServer112 = "smtpmail.waitrose.com"

$s_SmtpServer113 = "smtp.wanadoo.fr"

$s_SmtpServer114 = "smtp.webcom.com"

$s_SmtpServer115 = "mail.which.net"

$s_SmtpServer116 = "smtp.mail.wowway.com"

$s_SmtpServer117 = "smtp.mail.wideopenwest.com"

$s_SmtpServer118 = "smtp.tiscali.co.uk"

$s_SmtpServer119 = "smtp.mail.yahoo.com"

$s_SmtpServer120 = "smtp.sbcglobal.yahoo.com"

$s_SmtpServer121 = "mail.hotpop.com"

$s_SmtpServer122 = "smarthost.direct-adsl.nl"

;-------------------------------------------------------------------------------------------

$s_FromName = "mail-script"

$s_FromAddress = "removed email address"

$s_ToAddress = "removed email address"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$err = @ek

rror

$s_SmtpServer1 +=1

do

$Teller += 1

$Response = _INetSmtpMail ($s_SmtpServeradres, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

Until $Response = 1

the script needs to try send the mail on all smtp servers to the adress he needs to stay tying until he found one that works..

p.s. is anyone know a smtp server that i can use b.v. gmail that i can use in eatch network that is olso good

i want that when i run it it mails some text to me but the script needs to work on eatch computer so not only on mine so olso below other ISP's

Edited by Jos
removed email address

Share this post


Link to post
Share on other sites
Jos

i shall show the code now maby u guys can explane it bether to me then..

this is my code now

the script needs to try send the mail on all smtp servers to the adress he needs to stay tying until he found one that works..

p.s. is anyone know a smtp server that i can use b.v. gmail that i can use in eatch network that is olso good

i want that when i run it it mails some text to me but the script needs to work on eatch computer so not only on mine so olso below other ISP's

WTF: Are to totally deaf or something ? I hope I am getting through to you this time because the next time you will be banned!!!

Stop posting about this script because you are trying to EMail unwanted stuff trying to find the users ISP SMTP server.

As you have failed to give me legitimate purpose (Even Dutch was too difficult for you), I am not going to allow any more posts from you on this subject.

*click*

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×