User Profile

Collapse

Profile Sidebar

Collapse
MimiMi
MimiMi
Last Activity: Apr 21 '09, 08:15 AM
Joined: Aug 24 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MimiMi
    replied to How can I get my https file fetch working?
    in Perl
    Hi!
    KevinADC: Yes that's right I missed looking into Win32::IE::Mech anize, sorry for that!
    Now I've started looking into that though, and it seems to be filling my needs somewhat better, feels like I'm almost there, but still I don't get how I can get my files downloaded without manually having to provide any user input whatsoever.

    As of now I get an IE browser starting up, and I get to the download file prompt, but I...
    See more | Go to post
    Last edited by numberwhun; Mar 9 '09, 03:50 PM. Reason: Please use code tags

    Leave a comment:


  • MimiMi
    replied to How can I get my https file fetch working?
    in Perl
    Sorry sorry.. I don't need to waste your time by asking silly questions such as whether WWW::Mechanize works with JavaScript, that wasn't hard to find out for myself. The answer is NO. Unfortunately.

    Have to figure out how to solve this then.. some other way.. :/

    Cheers
    See more | Go to post

    Leave a comment:


  • MimiMi
    replied to How can I get my https file fetch working?
    in Perl
    Hello again!
    I appreciate all your efforts to help me out here!

    I've been working on other things, but now it's time to get back to this. (I still haven't got it working).

    Here's my current status:

    The myFile.html I get from
    Code:
    $mech->get( $url, ':content_file' => 'C:\Tmp\myFile.html' );
    (see previous posts if I'm unclear)
    has JavaScript on it.. Here are some parts...
    See more | Go to post
    Last edited by eWish; Feb 27 '09, 11:47 PM. Reason: Please use the code tags

    Leave a comment:


  • MimiMi
    replied to How can I get my https file fetch working?
    in Perl
    Hi! Thank you so much guys, for giving me feedback quickly!
    I now know though, that the problem is related to credentials...
    When, in the script, I change
    $mech->get( $url, ':content_file' => 'C:\Tmp\myFile. zip' );
    to
    $mech->get( $url, ':content_file' => 'C:\Tmp\myFile. html' );
    I can see that the downloaded file is indeed a webpage; and that is, a login page..

    I don't really know how to...
    See more | Go to post

    Leave a comment:


  • MimiMi
    started a topic How can I get my https file fetch working?
    in Perl

    How can I get my https file fetch working?

    Hi y'all!
    I'm new at perl, and I'm trying to automate a file fetch.

    I have this url (in this example called 'https://GetMyFile'), which, when I paste it into a browser, gives me the pop-up "File Download" - Do you want to open or save this file?.. And clicking 'save' gives me the file I want.

    I would like to achieve the same result automatically, without having to paste the url into a browser and click...
    See more | Go to post
    Last edited by eWish; Feb 4 '09, 10:49 PM. Reason: Please use the code tags.

  • MimiMi
    started a topic Adding files after exe created (NSIS)

    Adding files after exe created (NSIS)

    Hi!
    I'm using NSIS to build an installer and would like to be able to add configuration files AFTER the executable is created. That is, so that I can build and use the same installer (the same executable), but depending on who it's for I would like to be able to open up the exe and add a couple of files. (As opposed to building several different intaller exe:s).

    Does anyone know if this is even possible, and if so, how?
    ...
    See more | Go to post

  • MimiMi
    replied to Compiler issue?
    in C
    I have now found the answer to my question! The issues I had are well explained here:
    Working with Packing Structures

    I didn't know about this before.. Well, I knew data alignment and stuff, what I mean is that I didn't know about the compiler ways to "specify" it. It's always nice to learn new stuff!
    Cheers!
    See more | Go to post

    Leave a comment:


  • MimiMi
    replied to Compiler issue?
    in C
    I should have added that if PtrA->b is read in FuncA the 4 bytes beyond the end of the structure are accessed rather than the expected value; 3. ObjA.b does return the correct value...

    Does anyone know why?
    See more | Go to post

    Leave a comment:


  • MimiMi
    replied to Compiler issue?
    in C
    So, is the fault "mine", ie you're not supposed to write code that way, or is it Microsoft (Visual C++ Express 2005 linker)?
    See more | Go to post

    Leave a comment:


  • MimiMi
    replied to Compiler issue?
    in C
    Thank you all for your input!
    See more | Go to post

    Leave a comment:


  • MimiMi
    started a topic Compiler issue?
    in C

    Compiler issue?

    If a struct with the same name are defined in two different files,
    something is wrong when building since the wrong struct definition is used when accessing via pointer.

    See the following example:
    -----------------------------------------------------------------
    File A:
    typedef struct
    {
    uint8 a;
    uint16 b;
    } MyStruct_t;

    int FuncA(void)
    {
    MyStruct_t...
    See more | Go to post

  • MimiMi
    replied to Simple pass-by-reference question
    in C
    Ok, thank you very much, my problem is solved!
    However, I'm trying to really understand why just writing
    [code=c]
    p="something,so mething";
    [/code]
    doesn't work. While debugging, I see that the params-pointer and the p-pointer both point to the same address. That's why I'm confused.
    But is it because the pointer p only gets assigned to point to the string 'locally', so once we're outside the...
    See more | Go to post

    Leave a comment:


  • MimiMi
    started a topic Simple pass-by-reference question
    in C

    Simple pass-by-reference question

    How do I get the pass by reference-thing to work in this example?
    Since I'm still new to C I sometimes get confused in this matter, and this is one of those occasions.

    I'm obviously doing something wrong.
    Code:
    int main(void)
    {
    char *params =  mem_alloc(sizeof(char)*64);
    getParams(params);
    printf("Parameters: %s",params);
    mem_free(params);
    }
    
    int getParams(char
    ...
    See more | Go to post

  • Thank you all for taking the time to try and help me with this!
    The problem is now solved!

    memcpy was no good idea!
    And also, the struct member 'name' worked much better looking like this
    Code:
    struct table_entry {
      int length;
      int offset;
      char name[NAMESIZE];
    };
    instead of 'char *name'. And I didn't need an 'intermediate' buffer but could get the struct-data 'straight away'. Kinda...
    See more | Go to post

    Leave a comment:


  • Maybe you can do it like this?
    Code:
    memcpy(entry.length,buf,4);
    memcpy(entry.offset,buf+4,4);
    memcpy(entry.name,buf+8,16);
    Cheers!...
    See more | Go to post

    Leave a comment:


  • That's the thing, that's my problem: populating that one struct variable!

    Maybe it's just that my problem is too simple, that's why you all have a hard time understanding what I mean? (And of course, I'm not too great at describing my problem clearly either I guess..)

    Let's put it this way: If I have a buffer filled with bytes, and I want to populate a struct out of it, how do I do that?

    It's something...
    See more | Go to post

    Leave a comment:


  • Thank you both for taking the time trying to help me!

    I have the code to open the input file and read it into my parse buffer yes, so I guess my problem is figuring out the high level parsing a struct worth of data algorithm!

    No, I don't have any parse code yet (if I understand that last question correctly), that's kinda the problem..

    Thanks again!...
    See more | Go to post

    Leave a comment:


  • How to parse data from a buffer into an array of structs?

    Hello
    I'm still kinda new at C and I have this buffer filled with data that I want to to 'parse' into a an array of structs. How do I do this?
    The only thing I can think of is for-loops, kinda 'bytewise', but there must be a better way?

    It's something like this:

    Code:
    char buf[BUFSIZE];
    
    struct table_entry{
    int length;
    int offset;
    char *name;
    }
    
    struct
    ...
    See more | Go to post

  • MimiMi
    started a topic Passing values between Lua and C
    in C

    Passing values between Lua and C

    Hi!
    I'm trying to learn Lua scripting from within C and I'm now stuck on this (simple?) problem. I want to pass a value from C to Lua, and then get a value from Lua back to C.

    Here's an example of a piece of C-code which gets a value from Lua and which works fine for me:
    Code:
    int test_Lua()
    {
      lua_State *L=lua_open();
      char myArg[] = "result = \"Lua-string\"";
      luaL_dostring(L,myArg);
    ...
    See more | Go to post

  • Hi and thanks again for taking the time! I think I understand it a little bit better now, so again, thank you!

    Cheers!
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...