Jump to content

Recommended Posts

Posted (edited)

Can you guys help me with scaling the graph? Ish toooo tricky. x.x

The attached .zip has the source codes as well as the compiled thing. :)

Quadratics3_4.zip

Edited by Foy
  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

An actual question....

I'm making one with a key, like the script is a trial and it sort of locks itself after 10 runs.. you need randomly generated key to unlock it.

Now how can i e-mail the key to me?

I tried the INet.au3 include but the e-mails didnt get sent.....

I put in:

where $kkey is the full string for the key..

and yeah i saved the key in a .ini file so anyone who knew anything could crack it in 10 seconds. xP

_INetMail("NotMyEmail@myemailwebsite.com", "Key for: "&@userName, "Key is: "&$kkey)
Posted (edited)

An Alternitave would be to have an MD5 encyrpted string that contains something like @ComputerName & @Username and then when the user enters the key, their MD5 @computername & @username is checked against the entered key... You might also have to use the registry? Just some ideas. If you need help with that, then just ask :) oh, and welcome to the forum ;)

Some links to get you started:

MD5 Hash Plug-In (JSThePatriot)- Link

SMTP Mailer- (Jos [JdeB])- Link

EDIT: Looking closely at your GUI, it is way too small. Don't be afraid to use space! I can hardly read the example tab. My eyes aren't that bad are they? o_O

Edited by Bert
Posted (edited)

Well I was thinking of that but it seemed complicated and where I am and where I would be installing has many firewalls so would they possibly block it?

I think I may have tried that function quickly in a test script but the e-mail never came. x.x

EDIT: I made a neat little installer too, great for a quick flash drive -> computer install. FileInstall is pretty cool. :)

Edited by Foy
Posted

Well I like the compact GUI. :)

I guess I'm more prone to agrophobia than claustrophobia...

Well encrypting the key could be interesting but I dunno if anyone other than me will ever use it, it's not like I'd really charge for this. x.x

Especially when everyone I know has a graphing calculator already. ><

Or maybe I'm using a diff resolution, or I can blame my 20x20 vision, but I guess I'll resize it lol, no harm in taking up a little more free space.

I only added half these features because I showed someone what I'd been up to all night and he said "It'd be 10x cooler if you could graph it."

and... well, after about 1-hour of almost literally smashing my face into my desk I realized GuiSetState() goes AFTER all the GuiCtrlSetGraphic parts. X.X

Posted

Well I gotta admit I'm only starting grade 11 so much math stuff is totally new... those lines are cool but I honestly can't say I know what they are. =)

Posted

Have a look at this:

#include <INet.au3>
#AutoIt3Wrapper_plugin_funcs = MD5Hash
$plH = PluginOpen("MD5Hash.dll")
$to = InputBox ("Email", "Please Enter You Email Address")
$body = "--- AUTOMATICALLY GENERATED EMAIL!--- "& @CRLF & _
        "Key Sent At: " & @hour & ":" & @MIN & ":" & @SEC & @CRLF & _
        "Computer Name: " & @ComputerName & @CRLF & _
        "User Name: " & @UserName & @CRLF & _
        "MD5 Hash Key: " & MD5Hash("Test String", 2, True)
MsgBox (0, "", $body)
PluginClose($plH)

#Include<file.au3>
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
;##################################
; Include
;##################################
#Include<file.au3>
;##################################
; Variables
;##################################
$s_SmtpServer = ""                                  ; address for the smtp-server to use - REQUIRED
$s_FromName = ""                                      ; name from who the email was sent
$s_FromAddress = ""                                 ;  address from where the mail should come
$s_ToAddress = $to                                  ; destination address of the email - REQUIRED
$s_Subject = "Key Required! ("&@UserName&")"           ; subject from the email - can be anything you want it to be
$as_Body = $body                                         ; the messagebody from the mail - can be left blank but then you get a blank mail
$s_AttachFiles = ""                                    ; the file you want to attach- leave blank if not needed
$s_CcAddress = ""                                      ; address for cc - leave blank if not needed
$s_BccAddress = ""                                     ; address for bcc - leave blank if not needed
$s_Username = ""                                       ; username for the account used from where the mail gets sent  - Optional (Needed for eg GMail)
$s_Password = ""                                       ; password for the account used from where the mail gets sent  - Optional (Needed for eg GMail)
$IPPort = 25                                           ; port used for sending the mail
$ssl = 0                                            ; enables/disables secure socket layer sending - put to 1 if using httpS
;~ $IPPort=465                                         ; GMAIL port used for sending the mail
;~ $ssl=1                                          ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS

;##################################
; Script
;##################################

Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl)
If @error Then
    MsgBox(0, "Error sending message", "Error code:" & @error & "  Rc:" & $rc)
EndIf
;

Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "",$IPPort=25, $ssl=0)
    $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body,"<") and StringInStr($as_Body,">") Then
        $objEmail.HTMLBody = $as_Body
    Else
        $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
        Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
        For $x = 1 To $S_Files2Attach[0]
            $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x])
            If FileExists($S_Files2Attach[$x]) Then
                $objEmail.AddAttachment ($S_Files2Attach[$x])
            Else
                $i_Error_desciption = $i_Error_desciption & @lf & 'File not found to attach: ' & $S_Files2Attach[$x]
                SetError(1)
                return 0
            EndIf
        Next
    EndIf
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
;Authenticated SMTP
    If $s_Username <> "" Then
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $Ssl Then
        $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
;Update settings
    $objEmail.Configuration.Fields.Update
; Sent the Message
    $objEmail.Send
    if @error then
        SetError(2)
        return $oMyRet[1]
    EndIf
EndFunc;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description,3)
    ConsoleWrite("### COM Error !  Number: " & $HexNumber & "   ScriptLine: " & $oMyError.scriptline & "   Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
EndFunc;==>MyErrFunc
Posted

Woot, if it works I'm going to be super happy lol, the autoIt help file examples are how i taught myself and they aren't exactly the best teacher lol. :)

Posted

  Foy said:

Woot, if it works I'm going to be super happy lol, the autoIt help file examples are how i taught myself and they aren't exactly the best teacher lol. :)

You're doing much better then I did when I began! I was asking the stupidest questions....

The _INetSmtpMailCom() that Bert posted is very similiar to the one I used so it should work good!

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Posted

but the firewall where i am is a BITCH, it blocks EVERYTHING except http, all online games GONE, apparently this is having trouble working.... :)

Posted

I'll explain my situation a little further.

I go to boarding school.... Yeah I know.. lol

Well they have a network-wide firewall stopping just about everything except browser activity.... So I'm not sure I CAN use this command at all. :\

Is there any other way to send a .txt file to somewhere? I don't know all of autoits functions or user functions so I'm not sure if it's even possible.... but somehow upload a created .txt file to a online database type thing....

Posted (edited)

Can you even send e-mails through port 80? o.o

Worth a shot. xP

Edit: Nope.... like talking into a pillow, no one's listening. x.x

Edited by Foy

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...