muchisimas gracias por su ayuda , en este proyecto aprendi bastantes cosas neuvas :) , pude terminar el programa, ahi cosas que podria simplificarse muchisimo, pero como no las podia hacer andar me las tube que ingeniar de otra manera
. En fin , aca dejo como quedo el programilla terminado :)
Código: Seleccionar todo
#include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <IE.au3>
#include <StaticConstants.au3>
#include <Misc.au3>
InetGet("http://www.criteriondg.info/wordpress/wp-content/themes/criterion/images/walls/33.jpg",@TempDir&"\timage.jpg")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("FBlook.com.ar", 433, 286, 193, 135)
$creador = GUICtrlCreateInput("Tu Nombre", 110, 24, 225, 21)
GUICtrlSetCursor (-1, 5)
$Nombre = GUICtrlCreateInput("Nombre de la imagen", 110, 56, 225, 21)
GUICtrlSetCursor (-1, 5)
$pagina = GUICtrlCreateInput("URL de la imagen ,Ej: http://wallpapers.com/imagen.jpg", 50, 100, 355, 21)
GUICtrlSetBkColor(-1, 0xF0F0F0)
GUICtrlSetCursor (-1, 5)
$desc = GUICtrlCreateEdit("Descripcion , cual es el tema de la imagen?", 50, 130, 355, 100)
GUICtrlSetBkColor(-1, 0xF0F0F0)
GUICtrlSetData(-1, "Descripcion , cual es el tema de la imagen?")
GUICtrlSetCursor (-1, 5)
$Button1 = GUICtrlCreateButton("Aceptar", 300, 242, 103, 37, 0)
GUICtrlSetCursor (-1, 0)
$wiki = GUICtrlCreateButton("Wikipedia", 50, 242, 103, 37, 0)
GUICtrlSetCursor (-1, 0)
$Pic1 = GUICtrlCreatePic(@TempDir&"\timage.jpg", -8, -16, 440, 303,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
FileDelete(@scriptdir & "\" & "/plugins/VistaPrevia.html")
FileDelete(@scriptdir & "\" & "/plugins/plantilla.txt")
FileDelete(@ScriptDir & "/plugins/post.txt")
sleep(1000)
$files4 = FileRead(@ScriptDir & "/plugins/vpo.chx")
$final4 = _StringBetween($files4, "<html1>", "</html2>")
FileWrite(@ScriptDir & "/plugins/VistaPrevia.html", $final4[0])
;===================================
;Entrando a la cuenta de Userstyles
;===================================
$IeObj=_IECreate("http://userstyles.org/styles/new",1,0)
$ieform=_IEFormGetCollection($IeObj,1)
$InpUs=_IEGetObjByName($ieform, "login-existing")
$InpPass=_IEGetObjByName($ieform, "password")
_IeFormElementSetValue($InpUs, "xxxxx")
_IeFormElementSetValue($InpPass, "xxxxx")
_IeLoadWait($IeObj)
_IEFormSubmit($ieform)
_IeLoadWait($IeObj)
sleep(1000)
while 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $wiki
_IECreate("http://es.wikipedia.org/")
Case $msg = $Button1
_ReplaceStringInFile(@scriptdir & "/plugins/VistaPrevia.html","$miniimagen",GUICtrlRead($pagina))
GUISetState(@SW_HIDE)
exitloop
EndSelect
wend
;===================================
;Programa vista previa
;===================================
InetGet("http://img94.imageshack.us/img94/5972/dibujozbv.jpg",@TempDir&"\timage.jpg")
InetGet(GUICtrlRead($pagina),@TempDir&"\mini.jpg")
#Region ### START Koda GUI section ### Form=
$GUI = GUICreate("Propiedades del fondo", 400, 410, 193, 135)
$iMemo = GUICtrlCreateEdit("", -1, 360, 400, 70)
GUICtrlSetFont($iMemo, 10, 400, 0, "Propiedades del fondo")
GUICtrlCreatePic(@TempDir&"\mini.jpg", 28, 160, 340, 180, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
$aceptar = GUICtrlCreateButton("Aceptar", 38, 10, 100, 40, 0)
GUICtrlSetCursor (-1, 0)
$vistax = GUICtrlCreateButton("Vista Previa", 150, 10, 100, 40, 0)
GUICtrlSetCursor (-1, 0)
$Btn_RGB = GUICtrlCreateButton("Color de Fondo", 260, 10, 100, 40)
GUISetState()
$Ccolor = GUICtrlCreateInput("Pega el Codigo de color aca Ej: #FFFFFF", 84, 60, 225, 21)
GUICtrlSetCursor (-1, 5)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###{
;===================================
;tabla de color
;===================================
Func _ShowChoice($GUI, $iMemo, $Type, $Choose, $sMessage)
Local $cr
If $Choose <> -1 Then
If $Type = 0 Then ; convert COLORREF to RGB for this example
$cr = Hex($Choose, 6)
GUISetBkColor('' & StringMid($cr, 5, 2) & StringMid($cr, 3, 2) & StringMid($cr, 1, 2), $GUI)
Else
GUISetBkColor($Choose, $GUI)
EndIf
GUICtrlSetData($iMemo, $sMessage & $Choose & @CRLF, 1)
Else
GUICtrlSetData($iMemo, "User Canceled Selction" & @CRLF, 1)
EndIf
EndFunc ;==>_ShowChoice
;===================================
;crear archivos
;===================================
$file1= FileRead(@ScriptDir & "/plugins/po.chx")
$final1 = _StringBetween($file1, "<html>", "</html>")
FileWrite(@ScriptDir & "/plugins/plantilla.txt", $final1[0])
$file3= FileRead(@ScriptDir & "/plugins/eo.chx")
$final3 = _StringBetween($file3, "<html>", "</html>")
FileWrite(@ScriptDir & "/plugins/post.txt", $final3[0])
;===================================
;CheckBox
;===================================
_Color_Example()
Func _Color_Example()
Local $IeObj, $Checkbox_1, $Checkbox_2,$Checkbox_3,$Checkbox_4,$Checkbox_5,$Checkbox_6,$Checkbox_7,$Checkbox_9,$Checkbox_10
$Checkbox_1 = GUICtrlCreateCheckbox("Centro", 150, 120, 88, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_2 = GUICtrlCreateCheckbox("Arriba", 68, 120, 81, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_3 = GUICtrlCreateCheckbox("Izquierda", -2, 120, 69, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_4 = GUICtrlCreateCheckbox("Abajo", 240, 120, 77, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_5 = GUICtrlCreateCheckbox("Derecha", 318, 120, 90, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_6 = GUICtrlCreateCheckbox("Repetir en X", 68, 90, 81, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_7 = GUICtrlCreateCheckbox("Repetir en Y",240, 90, 81, 17 )
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_9 = GUICtrlCreateCheckbox("No repetir", 150, 90, 88, 17)
GUICtrlSetBkColor(-1, 0xffffff)
$Checkbox_10 = GUICtrlCreateCheckbox("Color", 315, 60, 44, 17)
GUICtrlSetBkColor(-1, 0xffffff)
GUICtrlCreatePic(@TempDir&"\timage.jpg", -8, -16, 430, 153,BitOR($SS_NOTIFY,$WS_CLIPSIBLINGS))
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Checkbox_1
If GUICtrlRead($Checkbox_1) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_1","center")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_1","center")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","center","$Checkbox_1")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","center","$Checkbox_1")
EndIf
Case $Checkbox_2
If GUICtrlRead($Checkbox_2) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_2","top")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_2","top")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","top","$Checkbox_2")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","top","$Checkbox_2")
EndIf
Case $Checkbox_3
If GUICtrlRead($Checkbox_3) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_3","left")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_3","left")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","left","$Checkbox_3")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","left","$Checkbox_3")
EndIf
Case $Checkbox_4
If GUICtrlRead($Checkbox_4) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_4","bottom")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_4","bottom")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","bottom","$Checkbox_4")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","bottom","$Checkbox_4")
EndIf
Case $Checkbox_5
If GUICtrlRead($Checkbox_5) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_5","right")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_5","right")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","right","$Checkbox_5")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","right","$Checkbox_5")
EndIf
Case $Checkbox_6
If GUICtrlRead($Checkbox_6) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_6","repeat-x")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_6","repeat-x")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","repeat-x","$Checkbox_6")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","repeat-x","$Checkbox_6")
EndIf
Case $Checkbox_7
If GUICtrlRead($Checkbox_7) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_7","repeat-y")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_7","repeat-y")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","repeat-y","$Checkbox_7")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","repeat-y","$Checkbox_7")
EndIf
Case $Checkbox_9
If GUICtrlRead($Checkbox_9) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_9","no-repeat")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","$Checkbox_9","no-repeat")
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","no-repeat","$Checkbox_9")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/plantilla.txt","no-repeat","$Checkbox_9")
EndIf
Case $Checkbox_10
If GUICtrlRead($Checkbox_10) = 1 Then ;
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html","$Checkbox_10",GUICtrlRead($Ccolor))
Else
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/VistaPrevia.html",GUICtrlRead($Ccolor),"$Checkbox_10")
EndIf
Case $Btn_RGB
_ShowChoice($GUI, $iMemo, 2, _ChooseColor(2, 0x0080C0, 2, $GUI), "Copiar el Codigo Arriba, cambia (0x) por (#) : ")
Case $vistax
_IECreate(@scriptdir & "/plugins/VistaPrevia.html")
Case $aceptar
GUISetState(@SW_HIDE)
exitloop
EndSwitch
WEnd
EndFunc ;==>_Color_Example
;===================================
;loading cuadro
;===================================
#Region ### START Koda GUI section ### Form=
$IeObjj = _IECreateEmbedded ()
$Form2 = GUICreate("Subiendo Fondo", 225, 90, 300, 305)
GUISetBkColor(0xFFFFFF)
$Label2 = GUICtrlCreateLabel(" CARGANDO....", 56, 70, 274, 16)
GUICtrlSetFont(-1, 8, 400, 0, "WST_Swed")
GUICtrlSetColor(-1, 0x99B4D1)
$GUIActiveX = GUICtrlCreateObj($IeObjj, -10, 10, 400, 50)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_IENavigate ($IeObjj, "http://img100.imageshack.us/img100/2134/ajaxloader.gif")
;===================================
;modificando y subiendo script
;===================================
$Inpshort=_IEGetObjByid($IeObj, "style_short_description")
$Inplong=_IEGetObjByName($IeObj, "style_long_description")
$Inpcss=_IEGetObjByid($IeObj, "css")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Ccolor",GUICtrlRead($Ccolor))
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","xxx",GUICtrlRead($pagina))
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_1"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_2"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_3"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_4"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_5"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_6"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_7"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_9"," ")
sleep(200)
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/Plantilla.txt","$Checkbox_10"," ")
sleep(200)
$file = FileRead(@ScriptDir & "/plugins//plantilla.txt")
$final = _StringBetween($file, "<html1>", "</html2>")
sleep(2000)
$LowerLimit = 1
$UpperLimit = 99
$RandomNumber = Random($LowerLimit,$UpperLimit,1)
_IeFormElementSetValue($Inpshort, "Facebook - " & GUICtrlRead($Nombre) & " - FBlook.com.ar - "& $RandomNumber)
_IeFormElementSetValue($Inplong, "Fondo subido por: "& GUICtrlRead($creador) & " - Administrador :Chavo Toledo")
_IeFormElementSetValue($Inpcss,$final[0])
sleep(5000)
$edicion=_IEGetObjByname($IeObj,"commit")
$edicion.click
_IeLoadWait($IeObj)
sleep(1000)
$s_Dir = _IEPropertyGet($IeObj,"locationurl")
ConsoleWrite($s_Dir & @CRLF)
While 1
$urlX = "http://userstyles.org/styles/create"
If $urlX=$s_Dir Then
MsgBox(0,"Atencion", "Se produjo un error ,intenta devuelta")
Else
exitloop
EndIf
wend
sleep(1000)
$urlx =_IEPropertyGet ($IeObj, "locationurl")
sleep(1000)
;===================================
;Entrando a blogger
;===================================
_IENavigate ($IeObj, "http://www.blogger.com/post-create.g?blogID=2604389951685807523&pli=1")
$ieform=_IEFormGetCollection($IeObj,1)
$InpUs=_IEGetObjByName($ieform, "Email")
$InpPass=_IEGetObjByName($ieform, "Passwd")
_IeFormElementSetValue($InpUs, "xxxxx")
_IeFormElementSetValue($InpPass, "xxxxx")
_IeLoadWait($IeObj)
_IEFormSubmit($ieform)
_IeLoadWait($IeObj)
;===================================
;Posteando
;===================================
$edicion=_IEGetObjById($IeObj,"ShowSourceEditor")
$edicion.click
sleep(10000)
$titlee=_IEGetObjByName($IeObj, "title")
$labels=_IEGetObjByName($IeObj, "post-labels")
_IeFormElementSetValue($titlee, "Fondo para Facebook - " & GUICtrlRead($Nombre) & " -")
_IeFormElementSetValue($labels, "Creados por los usuarios")
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/post.txt","$descripcion",GUICtrlRead($desc))
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/post.txt","$miniimagen",GUICtrlRead($pagina))
_ReplaceStringInFile(@scriptdir & "\" & "/plugins/post.txt","$script",$urlx)
$file2 = FileRead(@ScriptDir & "/plugins/post.txt")
$final2 = _StringBetween($file2, "<brr1>", "<brr2>")
sleep(500)
$postbodyx=_IEGetObjByid($IeObj, "textarea")
_IeFormElementSetValue($postbodyx,$final2[0])
sleep(1000)
$edicion=_IEGetObjById($IeObj,"publishButton")
$edicion.click
_IeLoadWait($IeObj)
;===================================
;Restaurando
;===================================
WinClose("Subiendo Fondo", "")
WinClose("Blogger: Fondos para Facebook - Estado de publicación - Windows Internet Explorer", "")
MsgBox(0,"Afirmativo", "Fondo subido con exito :D")
FileClose($Form2)
FileDelete(@scriptdir & "\" & "/plugins/VistaPrevia.html")
FileDelete(@scriptdir & "\" & "/plugins/plantilla.txt")
FileDelete(@scriptdir & "\" & "/plugins/post.txt")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
de una pagina .