Jump to content
Sign in to follow this  
ahmettben

How do I make clickable msn facebook.?

Recommended Posts

ahmettben

Posted Image

mold the program code

Global $Form = GUICreate("", 350, 400, 387, 170)
$Click1 = GUICtrlCreateButton("about", 270, 5, 75, 20)
    GUICtrlCreateButton("msn open", 10, 10, 150, 20)
    GUICtrlCreateButton("facebooklogin", 10, 40, 150, 20)
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case -3
            Exit
        Case $Click1
            _click1()
    EndSwitch
WEnd

Func _click1()
    GUISetState(@SW_DISABLE,$Form)
    Local $Form2 = GUICreate("", 300, 150, 415, 225)
    Local $Click2 = GUICtrlCreateButton("ok", 120, 115, 80, 25)
    $Group1 = GUICtrlCreateGroup("*****", 56, 8, 185, 105)
$Label1 = GUICtrlCreateLabel("autoitscript", 120, 59, 100, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case -3
                ExitLoop
            Case $Click2
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete($Form2)
    GUISetState(@SW_ENABLE,$Form)
    GUISetState(@SW_RESTORE,$Form)
EndFunc   ;==>_click1

msn code

Opt("TrayIconHide", 1)
Run(@ProgramFilesDir & "\Windows Live\Messenger\msnmsgr.exe")
WinWait("Windows Live Messenger","")
WinActive("Windows Live Messenger","")
ClipPut("e-mail")
Send("^v")
Send("{TAB}")
ClipPut("password")
Send("^v")
Send("{ENTER}")

facebook code

Opt("TrayIconHide", 1)
#include<IE.au3>
#include <File.au3>

Local $mailtxt = "e-mail"
Local $passtxt = "password"
$Mail = $mailtxt
$Pass = $passtxt
$oIE = _IECreate("https://login.facebook.com/login.php?login_attempt=1", 0, 1, 1)
$oForm = _IEFormGetObjByName($oIE, "login_form")
$oQuery = _IEFormElementGetObjByName($oForm, "email")
$o_Query = _IEFormElementGetObjByName($oForm, "pass")
$oSubmit = _IEFormElementGetObjByName($oForm, "login")
_IEFormElementSetValue($oQuery, $Mail)
_IEFormElementSetValue($o_Query, $Pass)
_IEAction($oSubmit, "click")
Edited by ahmettben

Share this post


Link to post
Share on other sites
anybastard

Hi

try this one

#requireadmin
#include<IE.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>


Opt("TrayIconHide", 1)

$Form = GUICreate("", 350, 400, 387, 170)
$Msn = GUICtrlCreateButton("msn open", 10, 10, 150, 20)
$Facebook = GUICtrlCreateButton("facebooklogin", 10, 40, 150, 20)
$About = GUICtrlCreateButton("about", 270, 5, 75, 20)

GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
            Exit
        Case $Msn
            Run(@ProgramFilesDir & "\Windows Live\Messenger\msnmsgr.exe")
            WinWait("Windows Live Messenger","")
            WinActive("Windows Live Messenger","")
            ClipPut("e-mail")
            Send("^v")
            Send("{TAB}")
            ClipPut("password")
            Send("^v")
            Send("{ENTER}")
            
        Case $Facebook
            Local $mailtxt = "e-mail"
            Local $passtxt = "password"
            $Mail = $mailtxt
            $Pass = $passtxt
            $oIE = _IECreate("https://login.facebook.com/login.php?login_attempt=1", 0, 1, 1)
            $oForm = _IEFormGetObjByName($oIE, "login_form")
            $oQuery = _IEFormElementGetObjByName($oForm, "email")
            $o_Query = _IEFormElementGetObjByName($oForm, "pass")
            $oSubmit = _IEFormElementGetObjByName($oForm, "login")
            _IEFormElementSetValue($oQuery, $Mail)
            _IEFormElementSetValue($o_Query, $Pass)
            _IEAction($oSubmit, "click")
            
            ; insert here a new case for "about" button 
            
        EndSwitch
        WEnd

Now seems to be ok you must add only "about" button

Regards

AnyB

Share this post


Link to post
Share on other sites
ahmettben

@anybastard How do I add "about" button.?

Share this post


Link to post
Share on other sites
GEOSoft

probably the same way you did it in your previous script.

$Click1 = GUICtrlCreateButton("about", 270, 5, 75, 20)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
ahmettben

Please give an example of a complete

Share this post


Link to post
Share on other sites
anybastard

Hi ,

is really necessary another GUI only for "about" button ??

You can use a simple message box or splash screen instead of a gui

Regards

AnyB.

Share this post


Link to post
Share on other sites
guinness

Please give an example of a complete

Why not read the Help file? GUICreate & GUICTrlCreateButton have some really great examples.

As GEOSoft said you've done it before, unless that wasn't your code!

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
ahmettben

@guinness I am from Turkey

I do not know much English

do not understand the help file

Please give examples

Share this post


Link to post
Share on other sites
anybastard

@ Ahmettben ,

here 90% of the users aren't english mother tongue ( for example i'm Italian ) . If you want an advice try to learn the english languages for your real life and for your digital life

For the next code or program that you will developed you MUST

1 - search in help file ( there are a lot of source code )

2 - search into the forum ( probably someone has /had your same problem )

3 - search with google on the net there are many and many source code

4 - try to post your script

5 - is very very important ........WAIT !!!

about your code it is very easy you can add a simple message box with another case in switch instruction like this

#requireadmin
#include<IE.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>


Opt("TrayIconHide", 1)

$Form = GUICreate("", 350, 400, 387, 170)
$Msn = GUICtrlCreateButton("msn open", 10, 10, 150, 20)
$Facebook = GUICtrlCreateButton("facebooklogin", 10, 40, 150, 20)
$About = GUICtrlCreateButton("about", 270, 5, 75, 20)

GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
            Exit
        Case $Msn
            Run(@ProgramFilesDir & "\Windows Live\Messenger\msnmsgr.exe")
            WinWait("Windows Live Messenger","")
            WinActive("Windows Live Messenger","")
            ClipPut("e-mail")
            Send("^v")
            Send("{TAB}")
            ClipPut("password")
            Send("^v")
            Send("{ENTER}")
            
        Case $Facebook
            Local $mailtxt = "e-mail"
            Local $passtxt = "password"
            $Mail = $mailtxt
            $Pass = $passtxt
            $oIE = _IECreate("https://login.facebook.com/login.php?login_attempt=1", 0, 1, 1)
            $oForm = _IEFormGetObjByName($oIE, "login_form")
            $oQuery = _IEFormElementGetObjByName($oForm, "email")
            $o_Query = _IEFormElementGetObjByName($oForm, "pass")
            $oSubmit = _IEFormElementGetObjByName($oForm, "login")
            _IEFormElementSetValue($oQuery, $Mail)
            _IEFormElementSetValue($o_Query, $Pass)
            _IEAction($oSubmit, "click")
            
        Case $About 
            MsgBox ( 0, "My first gui" , "This is my first program ver 1.0")
            
        EndSwitch
        WEnd

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.