Necesito hacer un script que haga prompt en diferentes lados coordenadas de la screen,
y si podeis un frame con un arcoiris de colores , se hace con un bucle ,respondan
RapidShare.de will permanently shut down the servers on 1. March 2010! nein ..
PD:Policia española psicópata
∩____∩
| (• ◡•)|
Bueno me respond a mí mismo desde el futuro ,eso se podía hacer con autoit o con la api de windows en c/c++
RapidShare.de will permanently shut down the servers on 1. March 2010! nein ..
PD:Policia española psicópata
∩____∩
| (• ◡•)|
xD claro man ,aquí el de la ventana prompt
#include <windows.h>
#include <stdlib.h>

LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
LPWSTR *CommandLineToArgvW(LPCWSTR lpCmdLine, int *pNumArgs);
char szClassName[ ] = "WindowsApplication";

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{           
 int argCount=0;


      
    HWND hwnd;               
    MSG messages;            
    WNDCLASSEX wincl;        

    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      
    wincl.style = CS_DBLCLKS;                 
    wincl.cbSize = sizeof (WNDCLASSEX);

    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
        wincl.lpszMenuName = NULL;                 
    wincl.cbClsExtra = 0;                      
    wincl.cbWndExtra = 0;                      
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    if (!RegisterClassEx (&wincl))
        return 0;
int val = atoi(lpszArgument);
    hwnd = CreateWindowEx (
           0,                   
           szClassName,         
           "xD",       
           WS_OVERLAPPEDWINDOW, 
           val,       
           val,       
           170,                 
           70,                 
           HWND_DESKTOP,        
           NULL,                
           hThisInstance,       
           NULL                 
           );

    ShowWindow (hwnd, nFunsterStil);

    while (GetMessage (&messages, NULL, 0, 0))
    {
        TranslateMessage(&messages);
        DispatchMessage(&messages);
    }

    return messages.wParam;
}



LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  
    {
        case WM_DESTROY:
            PostQuitMessage (0);       
            break;
        default:                      
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}
Llamarlo ventanaeggs1.cpp
Y el lanzador
#include <stdlib.h>
#include <stdio.h>
#include <string>


using namespace std;


string convertirInt(int number)
{
    if (number == 0)
        return "0";
    string temp="";
    string returnvalue="";
    while (number>0)
    {
        temp+=number%10+48;
        number/=10;
    }
    for (int i=0;i<temp.length();i++)
        returnvalue+=temp[temp.length()-i-1];
    return returnvalue;
}
int main(){
    string temp;string result;string izq;
    int point =0;  
const char *cstr;
    for(int i=0;i<700;i+=100){
            

   temp = convertirInt(i);
   cstr =  temp.c_str();
   izq = "ventanaeggs1 ";
   result = std::string(izq) + temp;const char * xD=result.c_str();
            system(xD);
            }
    
system("pause");

    return 0;
    }
viteeee¿? xD
RapidShare.de will permanently shut down the servers on 1. March 2010! nein ..
PD:Policia española psicópata
∩____∩
| (• ◡•)|
doble post- si queréis por consola, llamadlo
"ventanaeggs1.exe 400" por ejemplo ,y así sale un prompt en diferentes lados de la pantalla xD
RapidShare.de will permanently shut down the servers on 1. March 2010! nein ..
PD:Policia española psicópata
∩____∩
| (• ◡•)|
Responder

Volver a “C/C++”