#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=myspace.ico #AutoIt3Wrapper_outfile=MyspaceProfileEditor.exe #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #Include Opt("TrayIconHide", 1) dim $bT_BG dim $bT_T1 dim $bT_T2 dim $text_color1 dim $text_color2 dim $background_color dim $Gt_Bg_Color dim $gt_T1_Color dim $gt_T2_Color dim $sample_bg Dim $sample_T1 Dim $sample_T2 GUICreate("MySpace Layout Editor", 480, 640, 50, 50) $background_setup_url = GUICtrlCreateInput("Background image URL", 10, 10, 455, 20) $contact_box_url = GUICtrlCreateInput("Contact Box image URL", 10, 40, 455, 20) $extended_url = GUICtrlCreateInput("Extended Network image URL", 10, 70, 455, 20) $bT_T1 = GUICtrlCreateButton("Select Text 1 color", 10, 130, 455, 20) $bT_T2 = GUICtrlCreateButton("Select Text 2 color", 10, 160, 455, 20) $bT_BG = GUICtrlCreateButton("Select Background color", 10, 190, 455, 20) $Colors = GUICtrlCreateLabel("Colors Preview", 10, 220, 455, 20) $scrollbars = GUICtrlCreateCheckbox("Use defined colors for scrollbars", 10, 310) $hidefriends = GUICtrlCreateCheckbox("Hide friends", 10, 340) $hidecomments = GUICtrlCreateCheckbox("Hide comments", 10, 370) $centerprofile = GUICtrlCreateCheckbox("Center Profile", 10, 400) $addinstructions = GUICtrlCreateCheckbox("Add instructions to the final layout textfile", 10, 430) $bT_Output = GUICtrlCreateButton("Output Profile Code as textfile", 10, 460, 455, 20) GUISetState() Func Color_T1() $gt_T1_Color = _ChooseColor (2,0,2) $sample_T1=0 EndFunc Func Color_T2() $gt_T2_Color = _ChooseColor (2,0,2) $sample_T2=0 EndFunc Func Color_BG() $Gt_Bg_Color = _ChooseColor (2,0,2) $sample_bg=0 EndFunc Func SaveLayout() $filename = FileSaveDialog("Choose a name for your layout:", @WorkingDir, "Textfile layout code (*.txt)", 2) If @error Then MsgBox(0, "", "Save cancelled. Please set your selections again.") Else If StringRight ($filename, 4) <> ".txt" Then $filename &= ".txt" EndIf $file = FileOpen($filename, 1) ;Set Colors for html use, trims out 0x $Gt_Bg_Color = StringRight($Gt_Bg_Color,6) $gt_T1_Color = StringRight($gt_T1_Color,6) $gt_T2_Color = StringRight($gt_T2_Color,6) ;Get Images URLs $gt_bg_url = GUICtrlRead($background_setup_url) $gt_cb_url = GUICtrlRead($contact_box_url) $gt_extended = GUICtrlRead($extended_url) ;Get other options $gt_scrollbars = GUICtrlRead($scrollbars) $gt_hidefriends = GUICtrlRead($hidefriends) $gt_hidecomments = GUICtrlRead($hidecomments) $gt_centerprofile = GUICtrlRead($centerprofile) $gt_addinstructions = GUICtrlRead($addinstructions) $addinstructions_setup = "" & @CRLF & @CRLF $contact_box = "" & @CRLF & "" & @CRLF & "" & @CRLF & @CRLF $extended_setup = "" & @CRLF & "" & @CRLF $background_setup = "" & @CRLF & "" & @CRLF & "" & @CRLF & @CRLF $text_setup = "" & @CRLF & "" & @CRLF & "" & @CRLF & @CRLF $scrollbars_setup = "" & @CRLF & "" & @CRLF $hidefriends_setup = "" & @CRLF & "" & @CRLF $centerprofile_setup = "" & @CRLF & "" & @CRLF $hidecomments_setup = "" & @CRLF & "" & @CRLF & "
" If $gt_addinstructions = "1" Then FileWriteLine($file, $addinstructions_setup) EndIf If $gt_cb_url<> "Contact Box image URL" Then FileWriteLine($file, $contact_box) EndIf If $gt_bg_url<> "Background image URL" Then FileWriteLine($file, $background_setup) EndIf If $gt_extended<> "Extended Network image URL" Then FileWriteLine($file, $extended_setup) EndIf If $sample_bg=1 and $sample_T1=1 and $sample_T2=1 Then FileWriteLine($file, $text_setup) EndIf ;Checks for additional options If $gt_hidefriends = "1" Then FileWriteLine($file, $hidefriends_setup) EndIf If $gt_centerprofile = "1" Then FileWriteLine($file, $centerprofile_setup) EndIf If $gt_scrollbars = "1" Then FileWriteLine($file, $scrollbars_setup) EndIf If $gt_hidecomments = "1" Then FileWriteLine($file, $hidecomments_setup) EndIf FileClose($file) ShellExecute($filename) EndIf EndFunc ;==>SaveLayout While 1 If $Gt_Bg_Color<>0 And $sample_bg<>1 Then $background_color_sample = GUICtrlCreateGraphic(10, 250, 40, 40) GUICtrlSetBkColor($background_color_sample, $Gt_Bg_Color) GUICtrlCreateLabel("Background", 60, 270, 60, 20) GUICtrlSetColor(-1, $Gt_Bg_Color) $sample_bg=1 EndIf If $gt_T1_Color<>0 And $sample_T1<>1 Then $text1_color_sample = GUICtrlCreateGraphic(130, 250, 40, 40) GUICtrlSetBkColor($text1_color_sample, $gt_T1_Color) GUICtrlCreateLabel("Text 1", 180, 270, 60, 20) GUICtrlSetColor(-1, $gt_T1_Color) $sample_T1=1 EndIf If $gt_T2_Color<>0 And $sample_T2<>1 Then $text2_color_sample = GUICtrlCreateGraphic(250, 250, 40, 40) GUICtrlSetBkColor($text2_color_sample, $gt_T2_Color) GUICtrlCreateLabel("Text 2", 300, 270, 60, 20) GUICtrlSetColor(-1, $gt_T2_Color) $sample_T2=1 EndIf $msg = GUIGetMsg() Select Case $msg = $bT_T1 Call("Color_T1") Case $msg = $bT_T2 Call("Color_T2") Case $msg = $bT_BG Call("Color_BG") Case $msg = $bT_Output Call("SaveLayout") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd