Indigo Rose Software
  #166  
Old 1 Week Ago
rexzooly rexzooly is offline
Forum Enthusiast
 
Join Date: Jul 2007
Posts: 1,515
Ok your not even calling your function move th fucntion to the globe and then try calling the function with the details requested from the function i am 2 tired to fix or test anymore now i am half dead but look at that your coding on the extract is way out you call functions have the hole function in the button.
Reply With Quote
  #167  
Old 1 Week Ago
kauster kauster is offline
Forum Member
 
Join Date: May 2008
Posts: 9
Quote:
Originally Posted by rexzooly View Post
Ok your not even calling your function move th fucntion to the globe and then try calling the function with the details requested from the function i am 2 tired to fix or test anymore now i am half dead but look at that your coding on the extract is way out you call functions have the hole function in the button.
Thanks, am already in global function and call function makes
Code:
Rar.Extract (rar_File [1], {"*.*"}, Sfold, true, true, "", RAR_OVERWRITE_ALWAYS, "rar_Extract");
but this did not solve the problem, but any suggestions?
Reply With Quote
  #168  
Old 1 Week Ago
rexzooly rexzooly is offline
Forum Enthusiast
 
Join Date: Jul 2007
Posts: 1,515
Quote:
Originally Posted by kauster View Post
Thanks, am already in global function and call function makes
Code:
Rar.Extract (rar_File [1], {"*.*"}, Sfold, true, true, "", RAR_OVERWRITE_ALWAYS, "rar_Extract");
but this did not solve the problem, but any suggestions?
is that code on your button? can i ask it the rest of the function working part from the call back?
Reply With Quote
  #169  
Old 1 Week Ago
kauster kauster is offline
Forum Member
 
Join Date: May 2008
Posts: 9
Quote:
Originally Posted by rexzooly View Post
is that code on your button? can i ask it the rest of the function working part from the call back?
Ok

Code global functions:

Code:
-- Funcion para Callback function en rarExtract
function rar_Extract (Msg, Name, Percent, Size)
-- Progreso de extraccion de archivos
  if Msg == "process" then
 
   StatusDlg.Show(MB_ICONNONE, false);
   StatusDlg.SetMessage("Extrayendo...");
      StatusDlg.SetMeterPos(Percent);
   StatusDlg.SetStatusText(String.SplitPath(Name).Filename..String.SplitPath(Name).Extension.." : "..Math.Floor(Size/1024).." KB");
   

   

   return true;
   
-- Si el rar a extraer se compone de mas volumenes..
  elseif Msg == "volume" then
 	
 		result = Dialog.FileBrowse(true, "Locate Rar Part File", "'", "Rar Part Files(*part.rar)|*.part*.rar|", "", "", false, false)
		if result[1] == "CANCEL" then
			result[1] = ""
		end
		return result[1]

-- Si el archivo a extraer dispone de password..insertamos pass en el dialog
  elseif Msg == "password" then
 	
		return Dialog.PasswordInput("Contraseña", "El archivo esta protegigo, introduce la contraseña", MB_ICONQUESTION);
 
  end
end
Code buton to load rar:

Code:
-- Buscamos archivo rar, delimitamos browser para solo .rar
rar_File = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.rar)|*.rar|", "", "dat", false, false);
-- Si no se cancela el buscador
if (rar_File[1] ~= "CANCEL") then
-- Recogemos la información del rar seleccionado
 info_rar = Rar.GetInfo(rar_File[1], "");
-- error devuleve nil en ese caso ..mensaje 
  if info_rar == nil then
  
   Dialog.Message("Error !", "Erorr al copilar la información.")
-- Si todo va bien
  else
  info_rar.TotalSize = tamano(info_rar.TotalSize)
  info_rar.PackedSize = tamano(info_rar.PackedSize)
  -- Si la info del rar nos dice que no tiene comentarios el archivo..
    if info_rar.Comment == nil then
-- Impresion de la tabla de informacion del rar ( sin comentarios)
    Paragraph.SetText("Paragraph1","Versión :"..info_rar.UnpackVer.."\r\nHost OS : "..
									    info_rar.HostOS.."\r\nTotal Archivos : "..
									    info_rar.TotalFiles.."\r\nTamaño total : "..
									    info_rar.TotalSize.."\r\nTamaño comprimido : "..
									    info_rar.PackedSize.."\r\nRatio : "..
									    info_rar.Ratio.." %" );
	
	Paragraph.SetText("Paragraph2"," El archivo no tiene comentarios");
	else
	-- Si tiene comentarios , inpresion de la tabla de informacion del rar
	Paragraph.SetText("Paragraph1","Versión :"..info_rar.UnpackVer.."\r\nHost OS : "..
									    info_rar.HostOS.."\r\nTotal Archivos : "..
									    info_rar.TotalFiles.."\r\nTamaño total : "..
									    info_rar.TotalSize.."\r\nTamaño comprimido : "..
									    info_rar.PackedSize.."\r\nRatio : "..
									    info_rar.Ratio.." %");								    
	Paragraph.SetText("Paragraph2","Comentarios : "..info_rar.Comment);							    
      end
   end
end
-- Funcion para pasar el listado del rar ( delimitado por "|" ) en una tabla
function DelimitedStringToTable(DelimitedString, Delimiter)
	tbReturn = {};
	local strWorking;
	local nPos = nil;
	local strData;
	local nTableIndex = 1;
	local nDelimiterLength = String.Length(Delimiter);
	
	if(nDelimiterLength < 1)then
		tbReturn[nTableIndex] = DelimitedString;
		return tbReturn;
	end
	
	strWorking = DelimitedString;
	nPos = String.Find(strWorking,Delimiter);
	while(nPos ~= -1)do
		strData = String.Left(strWorking,nPos-1);
		tbReturn[nTableIndex] = strData;
		nTableIndex = nTableIndex + 1;
		local nLength = String.Length(strWorking);
		strWorking = String.Right(strWorking,nLength - (nPos + (nDelimiterLength-1)));
		nPos = String.Find(strWorking,Delimiter);
	end
	if(strWorking ~= "")then
		tbReturn[nTableIndex] = strWorking;
	end
	
	return tbReturn;
end
-- Lllamamos a los archivos contenidos en el rar
rar_contents = Rar.GetContents(rar_File[1], "AMSWaves", false);
-- Si el rar esta vacio o hay algun error mensaje
if rar_contents == nil then

	Dialog.Message("Error !", "Error al copilar el contenido del rar")
else
-- Borramos items anteriores en el listbox
    ListBox.DeleteItem("ListBox1", LB_ALLITEMS);
  -- Conevertimos en tabla la lista rar_contens 
    contents = DelimitedStringToTable(rar_contents, "|")
    for a,b in contents do
    
 
    -- Imprimimos lista en el listbox
    ListBox.AddItem("ListBox1",b , "");	
    end
end
Code buton to extract:

Code:
-- Si no seleccionamos ningun rar en "Buscar archivo rar" mesaje de error
if rar_File == nil then
  Dialog.Message("Error", "No has seleccionado un archivo .rar", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
 else
 -- Si todo esta bien , llamamos al dialogo para ubicación de extracción
  sFolder = Dialog.FolderBrowse("Selecciona directorio donde extraer archivos", _DesktopFolder);
 -- Si no cancelamos el dialogo..seguimos con la extraccion , en caso contario no hay acción
 if (sFolder ~= "CANCEL") then
 -- Extraemos archivos del rar_File( rar buscado anteriormente) en sFolder( ubicacion)
  correcto = Rar.Extract(rar_File[1], {"*.*"}, sFolder, true, true, "", RAR_OVERWRITE_ALWAYS, "rar_Extract");
  -- Si la extraccion es correcta primer dialogo, si hay errores segundo
  if correcto == true then
   Dialog.Message("Extracción de archivos", "La Extracción se realizó correctamente.");
  else
   Dialog.Message("Extracción de archivos", "Ocurrió un problema en el proceso de copia.");
  end
 end
StatusDlg.SetMeterPos(0);
StatusDlg.Hide(); 
end
Apz project:
Attached Files
File Type: apz rar.apz (296.0 KB, 3 views)
Reply With Quote
  #170  
Old 1 Week Ago
rexzooly rexzooly is offline
Forum Enthusiast
 
Join Date: Jul 2007
Posts: 1,515
Not what i asked for but ok i said does the rest of the function work part from the call back does it extract the rar file?
Reply With Quote
  #171  
Old 1 Week Ago
kauster kauster is offline
Forum Member
 
Join Date: May 2008
Posts: 9
Quote:
Originally Posted by rexzooly View Post
Not what i asked for but ok i said does the rest of the function work part from the call back does it extract the rar file?
yes ,if it makes the callback function to extract the file
Reply With Quote
  #172  
Old 1 Week Ago
rexzooly rexzooly is offline
Forum Enthusiast
 
Join Date: Jul 2007
Posts: 1,515
Quote:
Originally Posted by kauster View Post
yes ,if it makes the callback function to extract the file
No i said does the fucntion work apart from that? ok i going to take a back step as i don't have this plugin and i am having time to make a new one my self.

sorry.
Reply With Quote
Reply

Tags
action plugin, amswaves, amswrar, bug, compression, compressor, plugin, rar, untested software

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to share custom buttons with the group? mwreyf1 AutoPlay Media Studio 6.0 10 09-03-2009 05:01 AM
FREE : Timer Object Plugin reteset AutoPlay Media Studio 7.5 Plugins 33 04-23-2009 08:00 AM
FREE: UserMgmt Action Plugin TimeSurfer AutoPlay Media Studio 7.5 Discussion 2 04-27-2008 04:17 AM
Free WindowEx Action Plugin reteset AutoPlay Media Studio 7.5 Discussion 77 03-03-2008 10:45 PM
Free Plugin: Media Player Object Ted Sullivan AutoPlay Media Studio 5.0 7 09-24-2004 03:54 PM


All times are GMT -6. The time now is 08:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software