Hi all to the forum, here is my problem, i have write a program with gui (using Tk) and put a button that calls notepad and the file that i want to open. Something like this, system('notepad file.txt') That worked good in my tests when writing the code. But when i tried to make the .pl file executable via PerlApp I noticed that when i run the exe and click on the button to open the notepad the system freezes and i have to call the task manager. That happened both on windows xp and 7. To say the truth, i checked on the features "Hide console" on the perlapp before i make the file executable. When i uncheck this feature everything works great. But i dont want to have the console window at all when runnig my program. Does anyone know what elese can i do to solve this problem? Thanks in advance. I dont know if i posted in the right section, if not one moderator could remove it to one better.

Hi, thanks for answering i downloaded cava and made some of the steps.When i scan and build project then some files are created in the directory i have set. But i cant find the executable. Could you help me a little more please? Edit: Actually i have found the executable and have set it to gui executable but when i double-click it nothing happens..

after scaning your script make sure the TK module is being found if not your have to add its directory to its search path...

to add it on the menu on the left side under the cava packager your project name will be their if you click it it will load tabs to the right click the tab labeled perl inter. and add the directory to tk not d:/dir/to/tk just d:/dir/to because tk has a lot of modules and most are in their own directory outside of the tk folder...

I managed to do it following your steps but i have the same problem when i click on the button to open notepad, it freezes..Is there any other way to open a text file via notepad without the system("notepad file.txt") line maybe?

Yes i have noticed that! I have two files, the main one and the the other with the functions. In the main i wrote

Code

use Win32::Process; use Win32;

and i put the subroutine in the fun.pm file. But when i click to the button to open the file i get this one: The filename, directory name, or volume label syntax is incorrect. Tk::Error: 1 at Fun.pm line 1192. Tk callback for .button1 Tk::__ANON__ at C:/strawberry/perl/site/lib/Tk.pm line 250 Tk::Button::butUp at C:/strawberry/perl/site/lib/Tk/Button.pm line 175 <ButtonRelease-1> (command bound to event)I have changed the directory to C:\Windows\System32\notepad.exe but i get the same error. Also, after that i have "notepad file.txt" and the file.txt does exist in the win32 dir. Any help would be really appreciated

The final thing i have to do is to know where the file.txt is so to open it. Suppose my program first creates the file.txt and then the user can open it from the button choice. But, i cant put in the code the absolute path because, for me ok it works fine, but if someone download the program to \Downloads i want the file to be created there (i have done that) and to open that file in that specific dir. Any ideas guys?